VS:AddPoint

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Procedure AddPoint adds a vertex point to a newly created polygon. AddPoint is designed to be used with BeginPoly and EndPoly to define new polygon objects via VectorScript.
PROCEDURE AddPoint(
px,py  :REAL);
def vs.AddPoint(p):
    return None

Parameters

px REAL X Coordinates of vertex.
py REAL Y Coordinates of vertex.

Example

VectorScript

BeginPoly;
AddPoint(0,0);
AddPoint(2,0);
AddPoint(2,2);
AddPoint(1,3);
AddPoint(0,2);
AddPoint(0,0);
EndPoly;
{creates a polygon object}

BeginPoly;
AddPoint(x,y);
x := x + 1;
y := y + 1;
AddPoint(x,y);
x:= x + 1;
y := y - 1;
AddPoint(x,y);
EndPoly;
{creates a polygon with vertices as calculated}

Python

vs.BeginPoly()
vs.AddPoint(0,0)
vs.AddPoint(2,0)
vs.AddPoint(2,2)
vs.AddPoint(1,3)
vs.AddPoint(0,2)
vs.AddPoint(0,0)
vs.EndPoly()
#{creates a polygon object}

Version

Availability: from All Versions

See Also

AddPoint ArcTo BeginPoly ClosePoly
CurveThrough CurveTo DelVertex EndPoly
GetHole GetNumHoles GetPolyPt GetPolylineVertex
GetVertNum GetVertexVisibility InsertVertex OpenPoly
Poly SetPolyPt SetPolylineVertex SetVertexVisibility
Smooth

[[VS:AddPoint|AddPoint]] [[VS:ArcTo|ArcTo]] [[VS:BeginPoly|BeginPoly]] [[VS:ClosePoly|ClosePoly]] [[VS:CurveThrough|CurveThrough]] [[VS:CurveTo|CurveTo]] [[VS:DelVertex|DelVertex]] [[VS:EndPoly|EndPoly]] [[VS:GetHole|GetHole]] [[VS:GetNumHoles|GetNumHoles]] [[VS:GetPolylineVertex|GetPolylineVertex]] [[VS:GetPolyPt|GetPolyPt]] [[VS:GetVertexVisibility|GetVertexVisibility]] [[VS:GetVertNum|GetVertNum]] [[VS:InsertVertex|InsertVertex]] [[VS:OpenPoly|OpenPoly]] [[VS:Poly|Poly]] [[VS:SetPolylineVertex|SetPolylineVertex]] [[VS:SetPolyPt|SetPolyPt]] [[VS:SetVertexVisibility|SetVertexVisibility]] [[VS:Smooth|Smooth]]

Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox