| Add2DVertex | Objects - Polys Vectorworks 2012 |
VectorScript Declaration:
PROCEDURE Add2DVertex
( pX :REAL; pY :REAL; vertexType :INTEGER; arcRadius :REAL (Coordinate) ) ; Python:
return None
def vs.Add2DVertex(p, vertexType, arcRadius): Description:
This procedure will add to a polyline a vertex defined by its position, its type(0 to 4) and the radius if type is 3 or 4. A vertex of type 4 should be followed and preceded by corner vertices. If the type is equal to 4, the point will be a middle point of an arc. In this case if the radius is not given (0) it will be computed.Parameters:
p The vertex to add to a polyline. vertexType The type of the vertex it could be 0, 1, 2, 3 or 4. arcRadius The arc radius if the vertex type is 3 or 4. Example:
beginPoly; Add2DVertex(0,0,0,0); Add2DVertex(1,1,4,0); Add2DVertex(2,0,0,0); Add2DVertex(3,1,4,0); Add2DVertex(4,0,0,0); endPoly;
| AddPoint | Objects - Polys MiniCAD |
VectorScript Declaration:
PROCEDURE AddPoint
( pX :REAL; pY :REAL ) ; Python:
return None
def vs.AddPoint(p): 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.
Parameters:
p Coordinates of vertex. Example:
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}
| ArcTo | Objects - Polys MiniCAD4.0 |
VectorScript Declaration:
PROCEDURE ArcTo
( pX :REAL; pY :REAL; radiusDistance :REAL (Coordinate) ) ; Python:
return None
def vs.ArcTo(p, radiusDistance): Description:
Procedure ArcTo creates an arc vertex with a point of intersection at the specified coordinate point.
The endpoints of the arc are tangent to the control segments which intersect at p. If a radius of 0 is passed as the parameter, the arc endpoints will be at the vertices preceding and following the arc spline vertex.Parameters:
p Coordinates of vertex. radiusDistance Radius of vertex arc. Example:
BeginPoly; LineTo(-1",2"); LineTo(-2 1/2",1/2"); CurveTo(-1 1/2",-1 1/2"); LineTo(1",-1/2"); ArcTo(1",1 1/2",1/2"); EndPoly; {creates a polyline object}
| BeginPoly | Objects - Polys MiniCAD |
VectorScript Declaration:
PROCEDURE BeginPoly
; Python:
return None
def vs.BeginPoly(): Description:
Procedures BeginPoly creates a new polygon or polyline object in a Vectorworks document. When used with vertex creation procedure calls, BeginPoly and EndPoly() define the polygon object on a vertex by vertex basis.
A minimum of two vertices must be created, and calculations may be performed within the creation structure between vertex calls, thus allowing additional flexibility in object generation.Hidden edges may be created by using use MoveTo() or Move() between vertex calls.Example:
| ClosePoly | Objects - Polys MiniCAD |
VectorScript Declaration:
PROCEDURE ClosePoly
; Python:
return None
def vs.ClosePoly(): Description:
Procedures ClosePoly set the polygon creation mode for polygon objects created in VectorScript to closed. To turn this mode off, use Procedure OpenPoly; the two modes used in conjunction will act as a toggle for the feature.
Example:
ClosePoly; Poly(0,0,1,1,1,-1); {creates a closed 3 sided polygon}
| CurveThrough | Objects - Polys MiniCAD4.0 |
VectorScript Declaration:
PROCEDURE CurveThrough
( pX :REAL; pY :REAL ) ; Python:
return None
def vs.CurveThrough(p): Description:
Procedure CurveThrough fits a cubic spline through the specified point.
Parameters:
p Coordinates of vertex.
| CurveTo | Objects - Polys MiniCAD4.0 |
VectorScript Declaration:
PROCEDURE CurveTo
( pX :REAL; pY :REAL ) ; Python:
return None
def vs.CurveTo(p): Description:
Procedure CurveTo creates a bezier vertex point at the specified point. Parameter p specifies the coordinate location of the vertex.Parameters:
p Coordinate of vertex.
| DelVertex | Objects - Polys MiniCAD6.0 |
VectorScript Declaration:
PROCEDURE DelVertex
( objectHd :HANDLE; vertexNum :INTEGER ) ; Python:
return None
def vs.DelVertex(objectHd, vertexNum): Description:
Procedure DelVertex deletes a vertex from the referenced object. Parameter vertexNum specifies the vertex to be deleted.
Parameters:
objectHd Handle to polygon. vertexNum Index of vertex to be deleted.
| EndPoly | Objects - Polys MiniCAD |
VectorScript Declaration:
PROCEDURE EndPoly
; Python:
return None
def vs.EndPoly(): Description:
Procedure EndPoly completes the definition of a polygon or polyline object within a Vectorworks document. On calling EndPoly, the object is created in the document from the preceding vertex creation calls.
| GetHole | Objects - Polys VectorWorks9.0 |
VectorScript Declaration:
FUNCTION GetHole
( inOutsidePolyline :HANDLE; inIndex :INTEGER; VAR outHole :HANDLE ) :BOOLEAN ; Python:
return (BOOLEAN, outHole)
def vs.GetHole(inOutsidePolyline, inIndex): Description:
Returns a handle to a polyline defining an opening within the referenced polyline.
The definition polyline can be edited or queried using the standard VectorScript polyline API functions.Parameters:
inOutsidePolyline Handle to polyline. inIndex Index number of opening definition polyline. outHole Handle to definition polyline. Result:
Returns TRUE if the polyline contains openings, otherwise returns FALSE.Example:
PROCEDURE Example; VAR inPolyline :HANDLE; outNumHoles :INTEGER; inIndex :INTEGER; outHole :HANDLE; vertexNum :INTEGER; pX, pY :REAL; vertexType :INTEGER; arcRadius :REAL; BEGIN inPolyline := FSActLayer; IF GetNumHoles(inPolyline, outNumHoles) THEN BEGIN FOR inIndex := 1 TO outNumHoles DO BEGIN if GetHole(inPolyline, inIndex, outHole) THEN BEGIN FOR vertexNum := 1 TO GetVertNum(outHole) DO BEGIN GetPolylineVertex(outHole, vertexNum, pX, pY, vertexType, arcRadius); WriteLn('pX: ', pX, ' pY: ', pY); END; END; END; END; END; RUN(Example);See Also:
GetNumHoles
| GetNumHoles | Objects - Polys VectorWorks9.0 |
VectorScript Declaration:
FUNCTION GetNumHoles
( inPolyline :HANDLE; VAR outNumHoles :INTEGER ) :BOOLEAN ; Python:
return (BOOLEAN, outNumHoles)
def vs.GetNumHoles(inPolyline): Description:
Returns the number of openings in the referenced polyline.Parameters:
inPolyline Handle to polyline. outNumHoles The number of openings in the polyline object. Result:
Returns TRUE if the polyline contains openings, otherwise returns FALSE.See Also:
GetHole
| GetPolylineArcMaxRadius | Objects - Polys Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetPolylineArcMaxRadius
( hPoly :HANDLE; vertexNum :INTEGER ) :REAL ; Python:
return REAL
def vs.GetPolylineArcMaxRadius(hPoly, vertexNum): Description:
Return a maximum radius of the specified vertex of type arc or radius of a polyline.
Parameters:
hPoly Handle of the poliline vertexNum Index of vertex to be queried. Result:
If the vertex type is not arc or radius it returns -1.See Also:
GetPolylineVertex SetPolylineVertex
| GetPolylineVertex | Objects - Polys VectorWorks8.5 |
VectorScript Declaration:
PROCEDURE GetPolylineVertex
( obj :HANDLE; vertexNum :INTEGER; VAR pX :REAL; VAR pY :REAL; VAR vertexType :INTEGER; VAR arcRadius :REAL ) ; Python:
return (p, vertexType, arcRadius)
def vs.GetPolylineVertex(obj, vertexNum): Description:
Returns information about the specified polyline vertex.
Note that vertexNum is 1-based for Polygons and Polylines, and 0-based for 3D Polylines.Parameters:
obj Handle to object. vertexNum Index of vertex to be queried. p X-Y coordinates of vertex. vertexType Type of vertex. arcRadius Radius of vertex corner (arc vertex only). Example:
PROCEDURE Example; VAR obj :HANDLE; vertexNum :INTEGER; ptX, ptY :REAL; vertexType :INTEGER; arcRadius :REAL; BEGIN obj := FSActLayer; FOR vertexNum := 1 TO GetVertNum(obj) DO BEGIN GetPolylineVertex(obj, vertexNum, ptX, ptY, vertexType, arcRadius); TextOrigin(ptX, ptY); CreateText(Concat('vNum: ', vertexNum, ' vType: ', vertexType, ' radius: ', arcRadius)); END; END; RUN(Example);
| GetPolyPt | Objects - Polys MiniCAD |
VectorScript Declaration:
PROCEDURE GetPolyPt
( objectHd :HANDLE; index :INTEGER; VAR pX :REAL; VAR pY :REAL ) ; Python:
return p
def vs.GetPolyPt(objectHd, index): Description:
Procedure GetPolyPt returns the coordinates of a specified vertex of the referenced object.Parameters:
objectHd Handle to polygon. index Index of vertex (range of 1 to n). p Returns coordinates of vertex. Example:
for i := 1 to GetVertNum(thePoly) do begin GetPolyPt(thePoly, i, vertX, vertY); end;
| GetVertexVisibility | Objects - Polys VectorWorks10.0 |
VectorScript Declaration:
FUNCTION GetVertexVisibility
( h :HANDLE; vertnum :INTEGER ) :BOOLEAN ; Python:
return BOOLEAN
def vs.GetVertexVisibility(h, vertnum): Description:
Returns the visibility of the specified vertex of the referenced object.Parameters:
h Handle to the polygon or polyline vertnum Index of the vertex (zero-based). Result:
Returns true if the vertex is visible, false otherwise.See Also:
SetVertexVisibility
| GetVertNum | Objects - Polys MiniCAD |
VectorScript Declaration:
FUNCTION GetVertNum
( PolyHd:HANDLE ) :INTEGER ; Python:
return INTEGER
def vs.GetVertNum(PolyHd): Description:
Function GetVertNum returns the number of vertices of the referenced polygon or polyline object.
Parameters:
PolyHd Handle to polygon.
| InsertVertex | Objects - Polys VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE InsertVertex
( objectHandle :HANDLE; x :REAL; y :REAL; beforeVertexNum :INTEGER; vertexType :INTEGER; arcRadius :REAL ) ; Python:
return None
def vs.InsertVertex(objectHandle, x, y, beforeVertexNum, vertexType, arcRadius): Description:
Inserts a new vertex into polygon or polyline. If the vertexType is nonzero, it will convert the objectHandle into a polyline.Parameters:
objectHandle Handle to the polygon or polyline x X-coordinate of the vertex to add y Y-coordinate of the vertex to add beforeVertexNum Vertex number before which the new vertex is to be inserted vertexType Vertex type of the new vertex arcRadius For arc vertices, the radius of the arc
| IsPolyClosed | Objects - Polys Vectorworks 2014 |
VectorScript Declaration:
FUNCTION IsPolyClosed
( polyHandle:HANDLE ) :BOOLEAN ; Python:
return BOOLEAN
def vs.IsPolyClosed(polyHandle): Description:
Returns true if the specified polyline or polygon is a closed shape, and false otherwise.
| OpenPoly | Objects - Polys MiniCAD |
VectorScript Declaration:
PROCEDURE OpenPoly
; Python:
return None
def vs.OpenPoly(): Description:
Procedures OpenPoly set the polygon creation mode for polygon objects created in VectorScript to open. To turn this mode off, use Procedure ClosePoly; the two modes used in conjunction will act as a toggle for the feature.
Example:
OpenPoly; Poly(0,0,1,1,1,-1); {creates a open 3 sided polygon}
| Poly | Objects - Polys MiniCAD |
VectorScript Declaration:
PROCEDURE Poly
( p :REAL ) ; Python:
return None
def vs.Poly(p): Description:
Procedure Poly creates a polygon object in the document. Vertices of the polygon are specified by a parameter list of x1,y1 through xn,yn, which correspond to the coordinate locations of each vertex.
Example:
Poly(0,0,-0.5,1,0.5,1.5,2,1,1,-0.5);
| SetPolyClosed | Objects - Polys Vectorworks 2014 |
VectorScript Declaration:
PROCEDURE SetPolyClosed
( polyHandle :HANDLE; isClosed :BOOLEAN ) ; Python:
return None
def vs.SetPolyClosed(polyHandle, isClosed): Description:
Sets the open/closed condition of the referenced poly.
| SetPolylineVertex | Objects - Polys VectorWorks8.5 |
VectorScript Declaration:
PROCEDURE SetPolylineVertex
( obj :HANDLE; vertexNum :INTEGER; pX :REAL; pY :REAL; vertexType :INTEGER; arcRadiusDistance :REAL (Coordinate); recalcBounds :BOOLEAN ) ; Python:
return None
def vs.SetPolylineVertex(obj, vertexNum, p, vertexType, arcRadiusDistance, recalcBounds): Description:
Sets the attributes of the specified polyline vertex to the specified values.Parameters:
obj Handle to object. vertexNum Index (1-based) of vertex to be modified. p New X-Y coordinates of vertex. vertexType Type of vertex. arcRadiusDistance Radius of vertex corner (arc vertex only). recalcBounds Recalculate object bounds. Example:
PROCEDURE Example; {This will convert anything it can in the drawing to a polyline (including rectangles, polygons, etc.), and then it will fillet all of the corners with a radius of .015".} CONST kFilletRadius = .015"; VAR cnt :INTEGER; x, y :REAL; vertexType :INTEGER; vertexRadius :REAL; criteria :STRING; PROCEDURE FilletPolygon(h :HANDLE); BEGIN h := ConvertToPolyline(h); FOR cnt := 1 to GetVertNum(h) DO BEGIN GetPolylineVertex(h, cnt, x, y, vertexType, vertexRadius); SetPolylineVertex(h, cnt, x, y, 3, kFilletRadius, TRUE); END; END; BEGIN criteria := '(ALL)'; ForEachObject(FilletPolygon, criteria); END; RUN(Example);
| SetPolyPt | Objects - Polys MiniCAD |
VectorScript Declaration:
PROCEDURE SetPolyPt
( objectHd :HANDLE; index :INTEGER; xR :REAL; yR :REAL ) ; Python:
return None
def vs.SetPolyPt(objectHd, index, xR, yR): Description:
Procedure SetPolyPt sets the location a specified vertex in the referenced polygon or polyline.
Parameters:
objectHd Handle to polygon. index Index of vertex. xR New X coordinate of vertex. yR New Y coordinate of vertex.
| SetVertexVisibility | Objects - Polys VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE SetVertexVisibility
( h :HANDLE; vertnum :INTEGER; vis :BOOLEAN ) ; Python:
return None
def vs.SetVertexVisibility(h, vertnum, vis): Description:
Sets the visibility of the specified vertex of the referenced object.Parameters:
h Handle to the polygon or polyline. vertnum Index of the vertex (zero-based). vis Visibility of the vertex. See Also:
GetVertexVisibility
| Smooth | Objects - Polys MiniCAD |
VectorScript Declaration:
PROCEDURE Smooth
( smoothType:INTEGER ) ; Python:
return None
def vs.Smooth(smoothType): Description:
Procedure Smooth sets the smoothing type of newly created polyline or polygon objects.
Table - Smoothing Types
Smooth Type Constant None 0 Bezier 1 Cubic 2 Arc 3 Parameters:
smoothType Smoothing style. Example:
Smooth(2); Poly(0,0,-0.5,1,0.5,2);