ActSymDef Objects - Symbols 
MiniCAD

VectorScript Declaration:

FUNCTION   ActSymDef
:HANDLE ;

Python:

def  vs.ActSymDef():
   return HANDLE

Description:

Function ActSymDef returns a handle to the currently active symbol.

If the active symbol is not in the active document, it will be imported, and the imported symbol will be returned.

説明

現在リソースパレット上で選択されている登録シンボルのハンドルを返します。

アクティブシンボルがアクティブファイル上にない場合は、そのシンボルをアクティブファイルに取り込みます。取り込まれると、取り込まれたシンボルを返します。

Example:

HandleToActiveSym:=ActSymDef;

See Also:

ActLayer   ActiveClass   ActSymDefN  



  ActSymDefN Objects - Symbols 
Vectorworks 2021

VectorScript Declaration:

FUNCTION   ActSymDefN
( allowConflictDlg:BOOLEAN ) :HANDLE ;

Python:

def  vs.ActSymDefN(allowConflictDlg):
   return HANDLE

Description:

Function ActSymDefN returns a handle to the currently active symbol.

If the active symbol is not in the active document, it will be imported, unless there is a conflict and the allowConflictDlg parameter is set to FALSE. After being imported, the imported symbol will be returned.

説明

現在リソースマネージャ上で選択されているアクティブシンボルのハンドルを返します。

アクティブシンボルがアクティブファイル上にない場合は、そのシンボルをアクティブファイルに取り込みます。ただし、そのシンボルが競合している場合、allowConflictDlgパラメータがFALSEに設定されていると取り込まれません。取り込まれると、取り込まれたシンボルを返します。

Parameters:

allowConflictDlg Whether to show a conflict dialog if the active symbol is not in the active document, and a conflict would need to be resolved to import it. If there is a conflict and allowConflictDlg is set to FALSE, ActSymDefN will return NULL. アクティブシンボルがアクティブファイル上になく、そのシンボルを取り込むには競合を解決する必要がある場合に、競合(重複)ダイアログボックスを表示するかどうかを指定します。競合が発生し、allowConflictDlgがFALSEに設定されている場合、ActSymDefNはNULLを返します。

Example:

HandleToActiveSym:=ActSymDefN(TRUE);

See Also:

ActLayer   ActiveClass   ActSymDef  



  AddToPluginStyle Objects - Symbols 
Vectorworks 2017

VectorScript Declaration:

FUNCTION   AddToPluginStyle
(   hSymDef :HANDLE;
    itemName :STRING;
    styleType :INTEGER
) :BOOLEAN ;

Python:

def  vs.AddToPluginStyle(hSymDef, itemName, styleType):
   return BOOLEAN

Description:

Adds a new item to a plug-in style map.

説明

プラグインスタイルに新しい項目を追加します。

Parameters:

hSymDef Handle to a symbol definition containing a plug-in style. プラグインスタイルのハンドル
itemName Name of new item to add. 項目の名前
styleType Style type for new item. 0 sets the item to By Instance 1 sets the item to By style. 項目のタイプ
0: インスタンスの値を使用する
1: スタイルの値を使用する

Result:

TRUE if the item was added to the plug-in style.
FALSE if the symbol definition does not contain a plug-in style or the style alread contrains an item by the given name.

返り値

プラグインスタイルに項目を追加できた場合TRUEを返します。
指定したシンボル定義にプラグインスタイルが含まれていないか、指定した項目名がスタイルで既に使用されている場合にFALSEを返します。



  BeginSym Objects - Symbols 
MiniCAD

VectorScript Declaration:

PROCEDURE   BeginSym
( symbolName:STRING ) ;

Python:

def  vs.BeginSym(symbolName):
   return None

Description:

Procedure BeginSym creates a new symbol definition ina Vectorworks document.

Any objects created after a call to BeginSym will be included in the symbol definition. A call to EndSym will complete the creation of the symbol, which is then generated in the Vectorworks document.

説明

この手続きを実行した後、EndSymを実行するまでの間に作成された図形をシンボルとして登録します。

Parameters:

symbolName Name of the new symbol. シンボルの名前

Example:

BeginSym('Window');
  Rect(-5'-11",-1",-2'-0",-5'-11");
  Rect(-5'-8 3/4",-2 1/4",-2'-2 1/4",-2'-10");
  Rect(-5'-8 3/4",-3'-1 3/4",-2'-2 1/4",-5'-9");
  Rect(-4'-7",-2'-7 3/4",-3'-3 1/2",-2'-9 1/2");
  MoveTo(-5'-11",-3'-0");
  LineTo(-2'-0",-3'-0");
EndSym;



  CopySymbol Objects - Symbols 
MiniCAD

VectorScript Declaration:

FUNCTION   CopySymbol
(   filePath :STRING;
    symbol :STRING
) :BOOLEAN ;

Python:

def  vs.CopySymbol(filePath, symbol):
   return BOOLEAN

Description:

Procedure CopySymbol will copy a symbol into the active document from a user specified source document.

If the filename includes a fully qualified path, the path has to use the appropriate notation for the local operating system:
Macintosh HD:Applications:Vectorworks:Plug-Ins:Data:Notes.txt C:\Program Files\Vectorworks\Plug-Ins\Data\Notes.txt If the filename includes a path relative to the location of the Vectorworks executable, the subfolder delimiters have to be backslashes:
Plug-Ins\Data\Notes.txt If the filename does not include a path, the file is assumed to exist in the same folder as the Vectorworks executable.

説明

他のドキュメントから、アクティブなドキュメントにシンボルを取り込みます。

Parameters:

filePath File path to document, relative to the application folder. ファイルのパス
symbol Name of symbol to import. シンボルの名前

Result:

Returns a BOOLEAN value indicating the success or failure of the import operation.

返り値

取り込みの結果をBOOLEANの値で返します。

Example:

PROCEDURE CopySym;
VAR
	theSymbolName :STRING;
BEGIN
	theSymbolName := 'Fax';
	IF CopySymbol('Object Libraries\Office Equipment.mcd', theSymbolName) 
		THEN Symbol(theSymbolName, 0, 0, 0);
END;
RUN(CopySym);



  EndSym Objects - Symbols 
MiniCAD

VectorScript Declaration:

PROCEDURE   EndSym
;

Python:

def  vs.EndSym():
   return None

Description:

Procedure EndSym completes symbol creation in VectorScript. When EndSym is called, the any procedure calls defined since a call to BeginSym are used to create the symbol.

説明

BeginSymを実行した後、この手続きを実行するまでの間に作成された図形をシンボルとして登録します。



  GetSDName Objects - Symbols 
MiniCAD

VectorScript Declaration:

FUNCTION   GetSDName
( h:HANDLE ) :STRING ;

Python:

def  vs.GetSDName(h):
   return STRING

Description:

Function GetSDName returns the name of the referenced symbol definition.

説明

ハンドルで指定したシンボルの名前を返します。

Parameters:

h Handle to symbol definition. シンボルのハンドル



  GetSymbolOptionsN Objects - Symbols 
VectorWorks8.5

VectorScript Declaration:

PROCEDURE   GetSymbolOptionsN
(   name :STRING;
  VAR  insertMode :INTEGER;
  VAR  breakMode :INTEGER;
  VAR  className :STRING
) ;

Python:

def  vs.GetSymbolOptionsN(name):
   return (insertMode, breakMode, className)

Description:

Returns default class, insert options, and break options for the specified symbol.

Table - Symbol Insertion Options

Insertion Mode Description Constant Value
Insert on Center Line 0
Insert on Edge 1
Break Mode Description Constant Value
Full Break with Caps 1
Full Break No Caps 2
Half Break 3
No Break 4

説明

シンボルの挿入位置と壁の処理、クラスの設定を返します。

Parameters:

name Name of symbol. シンボルの名前
insertMode Returns insertion mode of symbol. 挿入位置
breakMode Returns break mode of symbol. 壁の処理
className Default class of symbol. クラスの名前



  GetSymbolType Objects - Symbols 
VectorWorks10.0

VectorScript Declaration:

FUNCTION   GetSymbolType
( objectHandle:HANDLE ) :INTEGER ;

Python:

def  vs.GetSymbolType(objectHandle):
   return INTEGER

Description:

Determines the type of the specified symbol instance. The return values are:
0 - 2D Only
1 - 3D Only
2 - Hybrid

説明

シンボルの種類(0:2Dのみ/1:3Dのみ/3:ハイブリッド)を返します。

Parameters:

objectHandle Handle to a symbol instance. シンボルのハンドル

Result:

-1 = error. Possibly wrong type of object passed in.
0 = 2D Symbol
1 = 3D Symbol
2 = Hybrid Symbol

返り値

-1:エラー シンボルではない図形のハンドルが与えられた場合など
0:2Dシンボル
1:3Dシンボル
2:ハイブリッドシンボル



  GetSymBrightMult Objects - Symbols 
VectorWorks8.0

VectorScript Declaration:

FUNCTION   GetSymBrightMult
( symbol:HANDLE ) :INTEGER ;

Python:

def  vs.GetSymBrightMult(symbol):
   return INTEGER

Description:

Function GetSymBrightMult returns the brightness multiplier of the referenced symbol.

The brightness multiplier is used for symbols that contains lights. This value is a percentage of the symbol definition's light brightness.

説明

ハンドルで指定したシンボルの、光源の明るさの乗数をパーセンテージで返します。

Parameters:

symbol Handle to symbol. シンボルのハンドル



  GetSymDefSubType Objects - Symbols 
Vectorworks 2017

VectorScript Declaration:

FUNCTION   GetSymDefSubType
( hSymDef:HANDLE ) :INTEGER ;

Python:

def  vs.GetSymDefSubType(hSymDef):
   return INTEGER

Description:

Returns the sub type defined for a symbol definiiton. This is used when creating and using plug-in styles.

説明

シンボル定義に定義された図形の種類(サブタイプ)を返します。 プラグインスタイルの作成時や使用時に利用します。

Parameters:

hSymDef Handle to a symbol definition contaiing a plug-in style. プラグインスタイルのハンドル



  GetSymLoc3D Objects - Symbols 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   GetSymLoc3D
(   objectHandle :HANDLE;
  VAR  x :REAL;
  VAR  y :REAL;
  VAR  z :REAL
) ;

Python:

def  vs.GetSymLoc3D(objectHandle):
   return (x, y, z)

Description:

Determines the location of a specified symbol or plug-in object in 3D space.

説明

3次元空間でのシンボルやプラグインオブジェクトの位置を返します。

Parameters:

objectHandle Handle to a symbol instance or a plug-in object in the drawing. シンボルやプラグインオブジェクトのハンドル
x The location of the object along the x-axis. X座標
y The location of the object along the y-axis. Y座標
z The location of the object along the z-axis. Z座標



  GetSymName Objects - Symbols 
MiniCAD

VectorScript Declaration:

FUNCTION   GetSymName
( symHd:HANDLE ) :STRING ;

Python:

def  vs.GetSymName(symHd):
   return STRING

Description:

Function GetSymName returns the symbol name of a referenced symbol in a Vectorworks document.

説明

ハンドルで指定したシンボルの名前を返します。

Parameters:

symHd Handle to placed symbol. シンボルのハンドル



  InsertSymbolInFolder Objects - Symbols 
VectorWorks8.5

VectorScript Declaration:

PROCEDURE   InsertSymbolInFolder
(   targetFolder :HANDLE;
    symbolDef :HANDLE
) ;

Python:

def  vs.InsertSymbolInFolder(targetFolder, symbolDef):
   return None

Description:

Inserts a symbol definition into the referenced symbol folder.

説明

ハンドルで指定したシンボルをシンボルフォルダに入れます。

Parameters:

targetFolder Handle to symbol folder. シンボルフォルダの名前
symbolDef Handle to symbol definition. シンボルのハンドル



  RemoveFrmPluginStyle Objects - Symbols 
Vectorworks 2017

VectorScript Declaration:

FUNCTION   RemoveFrmPluginStyle
(   hSymDef :HANDLE;
    itemName :STRING
) :BOOLEAN ;

Python:

def  vs.RemoveFrmPluginStyle(hSymDef, itemName):
   return BOOLEAN

Description:

Removes an entry from the plug-in style map.

説明

プラグインスタイルから項目を削除します。

Parameters:

hSymDef Handle to symbol definition containing a plug-in style. プラグインスタイルのハンドル
itemName Name of the item to remove from the plug-in style. 項目の名前

Result:

TRUE if the item was removed from the plug-in style.
FALSE if the item does not exist in the plug-in style or the symbol definition does not contain a plugin style.

返り値

プラグインスタイルから項目を削除できた場合TRUEを返します。
指定したシンボル定義にプラグインスタイルが含まれていないか、指定した項目名がプラグインスタイルとして使用されていない場合にFALSEを返します。



  SetActSymbol Objects - Symbols 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetActSymbol
( name:STRING ) ;

Python:

def  vs.SetActSymbol(name):
   return None

Description:

Procedure SetActSymbol sets the active symbol for a Vectorworks document.

説明

名前で指定したシンボルをアクティブにします。

Parameters:

name Name of symbol. シンボルの名前



  SetSymbolOptionsN Objects - Symbols 
VectorWorks8.5

VectorScript Declaration:

PROCEDURE   SetSymbolOptionsN
(   name :STRING;
    insertMode :INTEGER;
    breakMode :INTEGER;
    className :STRING
) ;

Python:

def  vs.SetSymbolOptionsN(name, insertMode, breakMode, className):
   return None

Description:

Sets the default class, insert options, and break options for the specified symbol.

Table - Symbol Insertion Options

Insertion Mode Description Constant Value
Insert on Center Line 0
Insert on Edge 1
Break Mode Description Constant Value
Full Break with Caps 1
Full Break No Caps 2
Half Break 3
No Break 4

説明

シンボルの挿入位置と壁の処理、デフォルトのクラスを設定します。

Parameters:

name Name of symbol. シンボルの名前
insertMode Insertion mode of symbol. 挿入位置
breakMode Break mode for symbol. 壁の処理
className Default class for symbol. クラスの名前



  SetSymBrightMult Objects - Symbols 
VectorWorks8.0

VectorScript Declaration:

PROCEDURE   SetSymBrightMult
(   symbol :HANDLE;
    brightnessMultiplier :INTEGER
) ;

Python:

def  vs.SetSymBrightMult(symbol, brightnessMultiplier):
   return None

Description:

Function SetSymBrightMult sets the brightness multiplier for the referenced symbol.

The brightness multiplier is used for symbols that contains lights. This value is a percentage of the symbol definition's light brightness.

説明

ハンドルで指定したシンボルの、光源の明るさの乗数をパーセンテージで設定します。

Parameters:

symbol Handle to symbol. シンボルのハンドル
brightnessMultiplier Brightness multiplier for symbol. 明るさの乗数(%)



  SetSymDefSubType Objects - Symbols 
Vectorworks 2017

VectorScript Declaration:

PROCEDURE   SetSymDefSubType
(   hSymDef :HANDLE;
    subType :INTEGER
) ;

Python:

def  vs.SetSymDefSubType(hSymDef, subType):
   return None

Description:

Sets the sub type for a symbol definition that is used to define a plug-in style.

説明

プラグインスタイルを定義するシンボル定義の図形の種類(サブタイプ)を設定します。

Parameters:

hSymDef Handle to symbol definition that is being used to define a plug-in style. プラグインスタイルのハンドル
subType Sub type identifier to set for the symbol definition. 図形の種類の識別番号



  Symbol Objects - Symbols 
MiniCAD

VectorScript Declaration:

PROCEDURE   Symbol
(   symbolName :STRING;
    pX :REAL;
    pY :REAL;
    rotationAngle :REAL
) ;

Python:

def  vs.Symbol(symbolName, p, rotationAngle):
   return None

Description:

Procedure Symbol places a symbol in the document at the specified coordinate location.

説明

アクティブなレイヤ上の指定した座標に、シンボルを配置します。

Parameters:

symbolName Name of symbol. シンボルの名前
p Coordinates of symbol insertion point. シンボルの座標
rotationAngle Rotation angle of symbol, in degrees. シンボルの回転角度



  SymbolToGroup Objects - Symbols 
VectorWorks10.0

VectorScript Declaration:

PROCEDURE   SymbolToGroup
(   h :HANDLE;
    convertAction :INTEGER
) ;

Python:

def  vs.SymbolToGroup(h, convertAction):
   return None

Description:

Converts referenced symbol to group using the specified conversion options.

Table - Convert Actions

Convert Action Constant
Don't convert subobjects 0
Convert plug-in and symbol subobjects 1
Convert all subobjects 2

説明

オプションを指定してシンボルをグループに変換します。

Parameters:

h Handle to the symbol シンボルのハンドル
convertAction Conversion action: 0 - don't convert subobjects 1 - convert subobjects that are plug-ins and symbols 2 - convert all subobjects オプション(0:下の階層の図形はグループに変換しない/1:下の階層にあるシンボルとプラグインオブジェクトをグループに変換する/2:すべての図形をグループに変換する)



  SymDefNum Objects - Symbols 
MiniCAD

VectorScript Declaration:

FUNCTION   SymDefNum
:LONGINT ;

Python:

def  vs.SymDefNum():
   return LONGINT

Description:

Function SymDefNum returns the number of symbol definitions within the active document.

説明

アクティブなドキュメントに登録されているシンボルの数を返します。

返り値

登録シンボルの数