BuildConstraintModelForObject Parametric Constraints 
Vectorworks 2011

VectorScript Declaration:

PROCEDURE   BuildConstraintModelForObject
(   h :HANDLE;
    traverseContainers :BOOLEAN
) ;

Python:

def  vs.BuildConstraintModelForObject(h, traverseContainers):
   return None

Description:

Create a constraint model for the specified object in the constraint manager. If 'traverseContainers' is true and the specified object is a symbol definition, a group or another container-like objects, it will go deep inside that container.
This function should typically be called for constrained objects that have been duplicated and newly inserted into the drawing.

説明

拘束マネージャーの指定した図形の拘束モデルを作成します。

Parameters:

h Handle to object 図形のハンドル
traverseContainers Whether to traverse containers-like objects コンテナ型の図形(オブジェクト)の中をたどるかどうか



  DeleteConstraint Parametric Constraints 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   DeleteConstraint
(   obj :HANDLE;
    constraint :HANDLE
) ;

Python:

def  vs.DeleteConstraint(obj, constraint):
   return None

Description:

Removes a constraint from the referenced object in the document.

説明

ハンドルで指定した図形から、指定した拘束を解除します。

Parameters:

obj Handle to object. 図形のハンドル
constraint Handle to constraint being deleted. 拘束のハンドル



  GetBinaryConstraint Parametric Constraints 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   GetBinaryConstraint
(   constrType :INTEGER;
    obj1 :HANDLE;
    obj2 :HANDLE;
    obj1VertA :INTEGER;
    obj1VertB :INTEGER;
    obj2VertA :INTEGER;
    obj2VertB :INTEGER;
    containedObj1 :LONGINT;
    containedObj2 :LONGINT
) :HANDLE ;

Python:

def  vs.GetBinaryConstraint(constrType, obj1, obj2, obj1VertA, obj1VertB, obj2VertA, obj2VertB, containedObj1, containedObj2):
   return HANDLE

Description:

Returns a handle to a binary parametric constraint applied to the referenced objects.

Table - Binary Constraint Types

Index
Constraint Type
1
coincident
2
collinear
3
parallel
6
tangent
7
concentric
8
distance
9
horizontal distance
10
vertical distance
12
angle
13
perpendicular

説明

ハンドルで指定した図形間に設定されている拘束のハンドルを返します。

Parameters:

constrType Type of constraint to be returned. 拘束の種類
obj1 Handle to first object in constraint relationship. 拘束する図形1のハンドル
obj2 Handle to second object in constraint relationship. 拘束する図形2のハンドル
obj1VertA Vertex defining the constraint geometry of first object. 拘束する図形1上にある頂点Aの番号
obj1VertB Vertex defining the constraint geometry of first object. 拘束する図形1上にある頂点Bの番号
obj2VertA Vertex defining the constraint geometry of second object. 拘束する図形2上にある頂点Aの番号
obj2VertB Vertex defining the constraint geometry of second object. 拘束する図形2上にある頂点Bの番号

Result:

Returns a HANDLE to the constraint if exists, otherwise returns NIL.

返り値

拘束のハンドルを返します。その他の場合はNILを返します。



  GetSingularConstraint Parametric Constraints 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   GetSingularConstraint
(   typeOfConstraint :INTEGER;
    obj :HANDLE;
    vertexA :INTEGER;
    vertexB :INTEGER
) :HANDLE ;

Python:

def  vs.GetSingularConstraint(typeOfConstraint, obj, vertexA, vertexB):
   return HANDLE

Description:

Returns the type of constraint applied to the referenced object.

Table - Constraint Types

Index
Constraint Type
4
Vertical
5
Horizontal
8
Distance
9
Vertical distance
10
Horizontal distance
11
Radius

説明

ハンドルで指定した図形に設定されている拘束のハンドルを返します。

Parameters:

typeOfConstraint Type of constraint to be returned. 拘束の種類
obj Handle to object. 図形のハンドル
vertexA Vertex defining the constraint geometry. 頂点番号A
vertexB Vertex defining the constraint geometry. 頂点番号B

Result:

Returns a HANDLE to the constraint if exists, otherwise returns NIL.

返り値

拘束のハンドルを返します。その他の場合はNILを返します。



  HasConstraint Parametric Constraints 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   HasConstraint
( h:HANDLE ) :BOOLEAN ;

Python:

def  vs.HasConstraint(h):
   return BOOLEAN

Description:

Returns whether the referenced object has a parametric constraint .

説明

ハンドルで指定した図形が拘束されていた場合は、TRUEを返します。

Parameters:

h Handle to object. 図形のハンドル

返り値

拘束されていた場合はTRUE



  SetBinaryConstraint Parametric Constraints 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   SetBinaryConstraint
(   typeOfConstraint :INTEGER;
    h1 :HANDLE;
    h2 :HANDLE;
    obj1VertA :INTEGER;
    obj1VertB :INTEGER;
    obj2VertA :INTEGER;
    obj2VertB :INTEGER;
    containedObj1 :LONGINT;
    containedObj2 :LONGINT
) :BOOLEAN ;

Python:

def  vs.SetBinaryConstraint(typeOfConstraint, h1, h2, obj1VertA, obj1VertB, obj2VertA, obj2VertB, containedObj1, containedObj2):
   return BOOLEAN

Description:

Applies a binary parametric constraint to the referenced objects. The geometry of the constraint is defined by the specified object vertices.

Table - Binary Constraint Types

Index
Constraint Type
1
coincident
2
collinear
3
parallel
6
tangent
7
concentric
8
distance
9
horizontal distance
10
vertical distance
12
angle
13
perpendicular


To apply a constraint to an object within a symbol, use GetClosestPt to obtain an index to the object and pass the index to either obj2VertA to use it as the first object or obj2VertB to use it as the second object. In all other instances, pass 0 to both these parameters.

説明

2つの図形に対して拘束を設定します。

Parameters:

typeOfConstraint Type of constraint to be applied. 拘束の種類
h1 Handle to object accepting constraint. 拘束する図形1のハンドル
h2 Handle to object accepting constraint. 拘束する図形2のハンドル
obj1VertA Vertex on first object defining constraint geometry. 拘束する図形1上にある頂点Aの番号
obj1VertB Vertex on first object defining constraint geometry. 拘束する図形1上にある頂点Bの番号
obj2VertA Vertex on second object defining constraint geometry. 拘束する図形2上にある頂点Aの番号
obj2VertB Vertex on second object defining constraint geometry. 拘束する図形2上にある頂点Bの番号
containedObj1 Object index, obtained from the GetClosestPt function. 拘束する図形1が入れ子になっている場合、指定している頂点が何番目の図形上かを示す値
containedObj2 Object index, obtained from the GetClosestPt function. 拘束する図形2が入れ子になっている場合、指定している頂点が何番目の図形上かを示す値

Result:

Returns a BOOLEAN value indicating whether the constraint was successfully applied.

返り値

正しく設定できた場合はTRUEを返します。



  SetConstraintValue Parametric Constraints 
VectorWorks9.0

VectorScript Declaration:

PROCEDURE   SetConstraintValue
(   constraint :HANDLE;
    value :REAL
) ;

Python:

def  vs.SetConstraintValue(constraint, value):
   return None

Description:

Sets the referenced dimensional constraint to a new value.

説明

拘束の値を設定します。

Parameters:

constraint Handle to constraint being modified. 拘束のハンドル
value New value for the constraint.



  SetSingularConstraint Parametric Constraints 
VectorWorks9.0

VectorScript Declaration:

FUNCTION   SetSingularConstraint
(   typeOfConstraint :INTEGER;
    h :HANDLE;
    vertexA :INTEGER;
    vertexB :INTEGER
) :BOOLEAN ;

Python:

def  vs.SetSingularConstraint(typeOfConstraint, h, vertexA, vertexB):
   return BOOLEAN

Description:

Applies a parametric constraint to the referenced object. The geometry of the constraint is defined by the specified object vertices.

Table - Constraint Types

Index
Constraint Type
4
Vertical
5
Horizontal
8
Distance
9
Vertical distance
10
Horizontal distance
11
Radius

説明

1つの図形に対して拘束を設定します。

Parameters:

typeOfConstraint Type of constraint to be applied. 拘束の種類
h Handle to object accepting constraint. 図形のハンドル
vertexA Vertex defining the constraint geometry. 頂点番号A
vertexB Vertex defining the constraint geometry. 頂点番号B

Result:

Returns a BOOLEAN value indicating whether the constraint was applied successfully.

返り値

正しく設定できた場合はTRUEを返します。