VS:SetPolylineVertex: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
 
mNo edit summary
 
Line 44: Line 44:
arcRadiusDistance
arcRadiusDistance
REAL
REAL
Radius of vertex corner (arc vertex only).
Radius of vertex corner (arc or radius vertex only).
</line>
</line>
<line>
<line>
Line 56: Line 56:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>
<remark>
Sets the specified vertex of the referenced polyline object.  Vertex type constant values are 0 - Corner, 1 - Bezier, 2 - Cubic, 3 - Arc</remark>
Sets the specified vertex of the referenced polyline object.  Vertex type constant values are 0 - Corner, 1 - Bezier, 2 - Cubic, 3 - Arc, 4 - Radius</remark>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------

Latest revision as of 14:15, 29 December 2022

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

Description

Sets the attributes of the specified polyline vertex to the specified values.

PROCEDURE SetPolylineVertex(
obj :HANDLE;
vertexNum :INTEGER;
pX,pY :REAL;
vertexType :INTEGER;
arcRadiusDistance :REAL;
recalcBounds :BOOLEAN);
def vs.SetPolylineVertex(obj, vertexNum, p, vertexType, arcRadiusDistance, recalcBounds):
    return None

Parameters

obj HANDLE Handle to object.
vertexNum INTEGER Index (1-based) of vertex to be modified.
p REAL New X-Y coordinates of vertex.
vertexType INTEGER Type of vertex.
arcRadiusDistance REAL Radius of vertex corner (arc or radius vertex only).
recalcBounds BOOLEAN Recalculate object bounds.

Remarks

Sets the specified vertex of the referenced polyline object. Vertex type constant values are 0 - Corner, 1 - Bezier, 2 - Cubic, 3 - Arc, 4 - Radius

Example

VectorScript

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);

Python


Version

Availability: from VectorWorks 8.5

See Also

For polylines:

For polygons:

For polylines:
  • [[VS:GetPolylineVertex| GetPolylineVertex]]

For polygons:

  • [[VS:GetPolyPt| GetPolyPt]]
  • [[VS:SetPolyPt| SetPolyPt]]