Add2DVertex Objects - Polys 
Vectorworks 2012

VectorScript Declaration:

PROCEDURE   Add2DVertex
(   pX :REAL;
    pY :REAL;
    vertexType :INTEGER;
    arcRadius :REAL (Coordinate)
) ;

Python:

def  vs.Add2DVertex(p, vertexType, arcRadius):
   return None

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.

説明

ポリラインに制御点を座標指定によって追加します。0から4のタイプがあり、タイプ3及び4は半径をパラメータとして持ちます。タイプ4は頂点によって挟まれなければなりません。また、タイプ4の場合、制御点は円弧の中点となります。タイプ0で半径が設定されなかった場合、自動的に算出されます。

Parameters:

p The vertex to add to a polyline. ポリラインに追加する頂点
vertexType The type of the vertex it could be 0, 1, 2, 3 or 4. 頂点のタイプは0,1,2,3,4の5種類です
arcRadius The arc radius if the vertex type is 3 or 4. 頂点のタイプ3もしくは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:

def  vs.AddPoint(p):
   return None

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.

説明

多角形に頂点を加えます。BeginPolyとEndPolyの間で使用します。

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:

def  vs.ArcTo(p, radiusDistance):
   return None

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.

説明

円弧の座標を頂点として追加します。BeginPolyとEndPolyの間で使用します。

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:

def  vs.BeginPoly():
   return None

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.

説明

多角形/曲線の作成を開始します。BeginPolyとEndPolyの間にAddPointで頂点を指定します。

Example:






  ClosePoly Objects - Polys 
MiniCAD

VectorScript Declaration:

PROCEDURE   ClosePoly
;

Python:

def  vs.ClosePoly():
   return None

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:

def  vs.CurveThrough(p):
   return None

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:

def  vs.CurveTo(p):
   return None

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:

def  vs.DelVertex(objectHd, vertexNum):
   return None

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:

def  vs.EndPoly():
   return None

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:

def  vs.GetHole(inOutsidePolyline, inIndex):
   return (BOOLEAN, outHole)

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.

返り値

穴が空いている場合はTRUEを返します。他の場合は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:

def  vs.GetNumHoles(inPolyline):
   return (BOOLEAN, outNumHoles)

Description:

Returns the number of openings in the referenced polyline.

説明

ハンドルで指定した曲線の穴の数を返します。その曲線に穴が空いていない場合はFALSEを返します。

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.

返り値

穴が空いている場合はTRUEを返します。他の場合はFALSEを返します。

See Also:

GetHole  



  GetPolylineArcMaxRadius Objects - Polys 
Vectorworks 2012

VectorScript Declaration:

FUNCTION   GetPolylineArcMaxRadius
(   hPoly :HANDLE;
    vertexNum :INTEGER
) :REAL ;

Python:

def  vs.GetPolylineArcMaxRadius(hPoly, vertexNum):
   return REAL

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.

返り値

頂点のタイプが円弧指定もしくは半径指定でない場合-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:

def  vs.GetPolylineVertex(obj, vertexNum):
   return (p, vertexType, arcRadius)

Description:

Returns information about the specified polyline vertex.

Note that vertexNum is 1-based for Polygons and Polylines, and 0-based for 3D Polylines.

説明

ハンドルで指定した多角形/曲線の頂点の値を返します。

注:vertexNumパラメータは、多角形/曲線の場合1から、3D多角形の場合0からの値になります。

Parameters:

obj Handle to object. 多角形/曲線のハンドル
vertexNum Index of vertex to be queried. 頂点番号
p X-Y coordinates of vertex. 頂点のX、Y座標
vertexType Type of vertex. 頂点の種類(0:頂点指定/1:ベジェポイント指定/2:キュービックスプラインポイント
指定/3:円弧指定)
arcRadius Radius of vertex corner (arc vertex only). 円弧の半径(頂点の種類が3の場合のみ有効)

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:

def  vs.GetPolyPt(objectHd, index):
   return p

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). 頂点番号(1から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:

def  vs.GetVertexVisibility(h, vertnum):
   return BOOLEAN

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.

返り値

TRUE:多角形の頂点が表示されています。
FALSE:多角形の頂点が表示されていません。

See Also:

SetVertexVisibility  



  GetVertNum Objects - Polys 
MiniCAD

VectorScript Declaration:

FUNCTION   GetVertNum
( PolyHd:HANDLE ) :INTEGER ;

Python:

def  vs.GetVertNum(PolyHd):
   return INTEGER

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:

def  vs.InsertVertex(objectHandle, x, y, beforeVertexNum, vertexType, arcRadius):
   return None

Description:

Inserts a new vertex into polygon or polyline. If the vertexType is nonzero, it will convert the objectHandle into a polyline.

説明

新しい頂点を多角形/曲線に挿入します。頂点の種類が0でない場合は、図形を曲線に変換します。

Parameters:

objectHandle Handle to the polygon or polyline 多角形/曲線のハンドル
x X-coordinate of the vertex to add X座標
y Y-coordinate of the vertex to add Y座標
beforeVertexNum Vertex number before which the new vertex is to be inserted 頂点番号
vertexType Vertex type of the new vertex 頂点の種類(0:頂点指定/1:ベジェポイント指定/2:キュービックスプラインポイント
指定/3:円弧指定)
arcRadius For arc vertices, the radius of the arc 円弧の半径(頂点の種類が3の場合のみ有効)



  IsPolyClosed Objects - Polys 
Vectorworks 2014

VectorScript Declaration:

FUNCTION   IsPolyClosed
( polyHandle:HANDLE ) :BOOLEAN ;

Python:

def  vs.IsPolyClosed(polyHandle):
   return BOOLEAN

Description:

Returns true if the specified polyline or polygon is a closed shape, and false otherwise.

説明

曲線や多角形が閉じていればTRUE、そうでなければFALSEを返します。



  OpenPoly Objects - Polys 
MiniCAD

VectorScript Declaration:

PROCEDURE   OpenPoly
;

Python:

def  vs.OpenPoly():
   return None

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:

def  vs.Poly(p):
   return None

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:

def  vs.SetPolyClosed(polyHandle, isClosed):
   return None

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:

def  vs.SetPolylineVertex(obj, vertexNum, p, vertexType, arcRadiusDistance, recalcBounds):
   return None

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. 頂点番号(1から)
p New X-Y coordinates of vertex. 頂点のX、Y座標
vertexType Type of vertex. 頂点の種類(0:頂点指定/1:ベジェポイント指定/2:キュービックスプラインポイント
指定/3:円弧指定)
arcRadiusDistance Radius of vertex corner (arc vertex only). 円弧の半径(頂点の種類が3の場合のみ有効)
recalcBounds Recalculate object bounds. 図形の領域を再計算させる場合はTRUE

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:

def  vs.SetPolyPt(objectHd, index, xR, yR):
   return None

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. 頂点のX座標
yR New Y coordinate of vertex. 頂点のY座標



  SetVertexVisibility Objects - Polys 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   SetVertexVisibility
(   h :HANDLE;
    vertnum :INTEGER;
    vis :BOOLEAN
) ;

Python:

def  vs.SetVertexVisibility(h, vertnum, vis):
   return None

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. 表示する場合はTRUE

See Also:

GetVertexVisibility  



  Smooth Objects - Polys 
MiniCAD

VectorScript Declaration:

PROCEDURE   Smooth
( smoothType:INTEGER ) ;

Python:

def  vs.Smooth(smoothType):
   return None

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