Absolute Command 
MiniCAD

VectorScript Declaration:

PROCEDURE   Absolute
;

Python:

def  vs.Absolute():
   return None

Description:

Sets the point designation method for VectorScript procedure calls. When this mode is active, all points specified in procedure calls are assumed to be coordinate locations within the document.


Example:

Absolute;
ClosePoly;
Poly(0,0,1,1,1,2,2,2,2,0);



  AcquireExportPDFSettingsAndLocation Command 
VectorWorks12.5

VectorScript Declaration:

FUNCTION   AcquireExportPDFSettingsAndLocation
( inbSeparateDocuments:BOOLEAN ) :BOOLEAN ;

Python:

def  vs.AcquireExportPDFSettingsAndLocation(inbSeparateDocuments):
   return BOOLEAN

Description:

Asks the user for the Export PDF settings and the PDF file name (or folder name if the parameter is true). This is intended to support Batch PDF Export.



  AngleVar Command 
MiniCAD

VectorScript Declaration:

PROCEDURE   AngleVar
;

Python:

def  vs.AngleVar():
   return None

Description:

Sets the angle designation method in VectorScript. When called, VectorScript will treat language symbols which can be interpreted as direction angles (e.g., N, S, NW, SE) as variables rather than angles.

Example:

procedure test;
var
	S : Real;

begin
	AngleVar;
	S := 30;
	LineTo(3", #S);
	{ The 'S' will be treated as a variable }
	{ and line will be drawn on 30 degree angle. }

end;
run(test);



  CallTool Command 
MiniCAD4.0

VectorScript Declaration:

PROCEDURE   CallTool
( toolID:INTEGER ) ;

Python:

def  vs.CallTool(toolID):
   return None

Description:

Activates the specified Vectorworks tool for a single use. After the tool has been used Vectorworks will revert back to the previously active tool.

Note: Please refer to the VectorScript Appendix for specific tool ID values.

Parameters:

toolID Vectorworks tool constant.

Example:

PushAttrs;
PenFore(16);
PenBack(0);
PenPat(-2);
CallTool(-201);
PopAttrs;



  ClosePDFDocument Command 
VectorWorks12.5

VectorScript Declaration:

PROCEDURE   ClosePDFDocument
;

Python:

def  vs.ClosePDFDocument():
   return None

Description:

This will finish creating the PDF document that you started with OpenPDFDocument. This is intended to support Batch Export to PDF.



  DoMenuText Command 
MiniCAD4.0 - obsolete as of VectorWorks8.0

VectorScript Declaration:

PROCEDURE   DoMenuText
( menuItem:STRING ) ;

Python:

def  vs.DoMenuText(menuItem):
   return None

Special Notes:

DoMenuText is obsolete as of VectorWorks8.0

Description:

Obsolete procedure.

Parameters:

menuItem Menu item name.

See Also:

DoMenuTextByName  



  DoMenuTextByName Command 
MiniCAD5.0

VectorScript Declaration:

PROCEDURE   DoMenuTextByName
(   subMenu :STRING;
    index :INTEGER
) ;

Python:

def  vs.DoMenuTextByName(subMenu, index):
   return None

Description:

Calls the specified Vectorworks menu command item.

If the item is part of a Vectorworks menu chunk, pass the position of the item within the chunk as the second parameter. For menu items that are not part of a chunk, pass 0 as the second parameter.

Note: DoMenuTextByName uses the internal Vectorworks menu item name to reference the menu command, and calls to this procedure will work on localized (international) versions of Vectorworks without modification. Note also that when calling VS plug-ins, you have to use the filename (which could be different from the internal plug-in name).

A table listing DoMenuTextByName values can be found in the VectorScript Appendix.

Parameters:

subMenu Menu item selector.
index Menu chunk item position (range of 1 - n).

Example:

PROCEDURE DoMenuTextByNameExample;
BEGIN
	DoMenuTextByName('Print',0); {calls the print dialog}
	DoMenuTextByName('Standard Views',8); {sets view to right isometric}
END;
RUN(DoMenuTextByNameExample);



  ExportPDFPages Command 
VectorWorks12.5

VectorScript Declaration:

FUNCTION   ExportPDFPages
( savedViewNameStr:STRING ) :INTEGER ;

Python:

def  vs.ExportPDFPages(savedViewNameStr):
   return INTEGER

Description:

This will export the current document to PDF. You must call OpenPDFDocument before calling this function. This is intended to support Batch Export to PDF.



  Move Command 
MiniCAD

VectorScript Declaration:

PROCEDURE   Move
(   moveDX :REAL;
    moveDY :REAL
) ;

Python:

def  vs.Move(move):
   return None

Description:

Sets the position of the graphics pen in the Vectorworks document by moving a specified distance from the current pen location.

Horizontal and vertical offsets from the initial location. The final position of the pen at a point whose coordinates are (x+moveDX, y+moveDY).


Parameters:

move X-Y offset distance.

Example:

Move(6,1);
{ moves the graphics pen 6 units to the right }
{ and 1 unit up from the current position.    }

See Also:

MoveTo  



  MoveTo Command 
MiniCAD

VectorScript Declaration:

PROCEDURE   MoveTo
(   pX :REAL;
    pY :REAL
) ;

Python:

def  vs.MoveTo(p):
   return None

Description:

Sets the position of the graphics pen in the Vectorworks document using absolute coordinate values. The parameter specifies the X-Y coordinate location where the pen should be moved.

Parameters:

p X-Y coordinate location.

Example:

MoveTo(4,3);
{moves the graphics pen to (4,3)}

See Also:

Move  



  NoAngleVar Command 
MiniCAD

VectorScript Declaration:

PROCEDURE   NoAngleVar
;

Python:

def  vs.NoAngleVar():
   return None

Description:

Sets the angle designation method in VectorScript. When called, VectorScript will treat language symbols which can be interpreted as direction angles (e.g., N, S, NW, SE) as as angles, rather than as variables.

Example:

procedure test;
var
	S : Real;

begin
	NoAngleVar;
	S := 30;
	LineTo(3", #S);
	{ The 'S' will be treated as the direction 'South'  }
	{ and line will be drawn on 270 degree angle. }

end;
run(test);



  OpenPDFDocument Command 
VectorWorks12.5

VectorScript Declaration:

FUNCTION   OpenPDFDocument
( inFilenameStr:STRING ) :BOOLEAN ;

Python:

def  vs.OpenPDFDocument(inFilenameStr):
   return BOOLEAN

Description:

Begins the export to a PDF document. You must call AcquireExportPDFSettingsAndLocation before calling this function. This is intended to support Batch PDF Export.



  PenLoc Command 
MiniCAD

VectorScript Declaration:

PROCEDURE   PenLoc
( VAR  pX :REAL;
  VAR  pY :REAL
) ;

Python:

def  vs.PenLoc():
   return p

Description:

Returns the current coordinate location of the graphics pen.

Parameters:

p The current location of the graphics pen.

Example:

PenLoc(theXCoord,theYCoord);



  PopAttrs Command 
MiniCAD4.0

VectorScript Declaration:

PROCEDURE   PopAttrs
;

Python:

def  vs.PopAttrs():
   return None

Description:

Restores the attribute, tool, and constraint settings saved by an earlier call to PushAttrs.

Example:

PROCEDURE Example;
BEGIN
  PushAttrs;
  PenFore(215);
  PenBack(5);
  PenPat(25);
  PenSize(42);
  PenPat(25);
  SetConstrain('q');
  CallTool(-201);
  PopAttrs;
END;
RUN(Example);

See Also:

PushAttrs  



  PrintUsingPrintDialog Command 
VectorWorks10.5

VectorScript Declaration:

FUNCTION   PrintUsingPrintDialog
:INTEGER ;

Python:

def  vs.PrintUsingPrintDialog():
   return INTEGER

Description:

Available in Industry Series products only. Prints the active document. The Print Dialog will be displayed. The PageSetup dialog will be displayed, before the print dialog, if the existing print settings are not valid for the current printer.

Table - Return Values

Return Value Status
0 User cancelled
1 Success
2 Failure



  PrintWithoutUsingPrintDialog Command 
VectorWorks10.5

VectorScript Declaration:

FUNCTION   PrintWithoutUsingPrintDialog
:INTEGER ;

Python:

def  vs.PrintWithoutUsingPrintDialog():
   return INTEGER

Description:

Available in Industry Series products only. Prints the active document. Neither the Print Dialog nor the PageSetup dialog will be displayed. This function can fail with certain printers if PrintUsingPrintDialog had not previously been called for the active document.

Table - Return Values

Return Value Status
0 User cancelled
1 Success
2 Failure




  PushAttrs Command 
MiniCAD4.0

VectorScript Declaration:

PROCEDURE   PushAttrs
;

Python:

def  vs.PushAttrs():
   return None

Description:

Stores current attribute, tool, text, and constraint settings for later retrieval as the document default settings. Document settings can be modified as needed after using this call, and the stored settings can be restored with a call to PopAttrs. Calling this function more than once (nested) is allowed. The settings will be placed on a stack, and will be retrieved by calls to PopAttrs in the correct sequence.

Example:

PROCEDURE Example;
BEGIN
  PushAttrs;
  PenFore(215);
  PenBack(5);
  PenPat(25);
  PenSize(42);
  PenPat(25);
  SetConstrain('q');
  CallTool(-201);
  PopAttrs;
END;
RUN(Example);

See Also:

PopAttrs  



  Relative Command 
MiniCAD

VectorScript Declaration:

PROCEDURE   Relative
;

Python:

def  vs.Relative():
   return None

Description:

Sets the point designation method for VectorScript procedure calls.

When this mode is active, all points specified in procedure calls are assumed to be X-Y offsets from the current graphics pen location. For example, the point designation (0,2) will move the graphics pen two vertical units away from its present location.


Example:

Relative;
ClosePoly;
Poly(0,0,1,1,1,2,2,2,2,0);



  Run Command 
MiniCAD

VectorScript Declaration:

PROCEDURE   Run
( p:PROCEDURE ) ;

Python:

def  vs.Run(p):
   return None

Description:

Initiates the execution of a VectorScript command by signalling the VectorScript interpreter to execute the script source code.

The procedure takes a single parameter, which is the name of the VectorScript command as defined at the beginning of the source code listing.

Example:

PROCEDURE Example;
BEGIN
	Sysbeep;
	Sysbeep;
	Sysbeep;
END;
RUN(Example);



  SetTool Command 
MiniCAD

VectorScript Declaration:

PROCEDURE   SetTool
( theTool:INTEGER ) ;

Python:

def  vs.SetTool(theTool):
   return None

Description:

Activates the specified Vectorworks tool for use. The tool remains selected as the active tool after use.

Note: Please refer to the VectorScript Appendix for specific tool ID values.

Parameters:

theTool Vectorworks tool constant.

Example:

SetTool(-203);

See Also:

CallTool