VS:InsertVertex
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Inserts a new vertex into polygon or polyline. If the vertexType is nonzero, it will convert the objectHandle into a polyline.
PROCEDURE InsertVertex(
objectHandle :HANDLE;
x :REAL;
y :REAL;
beforeVertexNum :INTEGER;
vertexType :INTEGER;
arcRadius :REAL);
def vs.InsertVertex(objectHandle, x, y, beforeVertexNum, vertexType, arcRadius): return None
Parameters
objectHandle HANDLE Handle to the polygon or polyline x REAL X-coordinate of the vertex to add y REAL Y-coordinate of the vertex to add beforeVertexNum INTEGER Vertex number before which the new vertex is to be inserted vertexType INTEGER Vertex type of the new vertex: 0 =Corner; 1= Bezier; 2= Cubic; 3= Arc; arcRadius REAL For arc vertices, the radius of the arc
Remarks
_c_, (2010.12.23) The routine also when used for adding an arc vertex needs a correction of the arc passed:
- pass "0" --> a radius for arc on circle by three points will be autogenerated
- pass anything else (custom radius): you need to convert the radius to mm:
- arcRadius := arcRadius / upi * 25.4;
Version
Availability: from VectorWorks 10.0