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.

Example:

HandleToActiveSym:=ActSymDef;

See Also:

ActLayer   ActiveClass  



  BeginFolder Objects - Symbols 
MiniCAD

VectorScript Declaration:

PROCEDURE   BeginFolder
;

Python:

def  vs.BeginFolder():
   return None

Description:

Procedure BeginFolder creates a new symbol folder in a Vectorworks document. Any symbols or symbol folders created after the current call to BeginFolder will be nested inside the new symbol folder. A call to EndFolder will complete the creation of the symbol folder, which is then generated in the Vectorworks document.

To name the new symbol folder, precede BeginFolder with a call to NameObject.

Example:

NameObject('Object Symbols');
BeginFolder;
  BeginSym('Oval Symbols');
    PenSize(14);
    PenPat(2);
    FillPat(1);
    FillFore(0,0,0);
    FillBack(65535,65535,65535);
    PenFore(0,0,0);
    PenBack(65535,65535,65535);
    Oval(-1/4",1/4",3/4",-3/4");
  EndSym;
EndFolder;
{creates the symbol folder 'Object Symbols', which contains a symbol}



  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.

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.

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



  EndFolder Objects - Symbols 
MiniCAD

VectorScript Declaration:

PROCEDURE   EndFolder
;

Python:

def  vs.EndFolder():
   return None

Description:

Procedure EndFolder completes symbol folder creation in VectorScript. When EndFolder is called, the any procedure calls defined since a call to BeginFolder are used to create symbols and/or symbol folders.



  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.




  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

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



  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.



  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.

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.
y The location of the object along the y-axis.
z The location of the object along the z-axis.



  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.



  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.



  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



  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.