Absolute Command 

Declaration:

PROCEDURE   Absolute
;

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 

Declaration:

FUNCTION   AcquireExportPDFSettingsAndLocation
( inbSeparateDocuments:BOOLEAN ) :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 

Declaration:

PROCEDURE   AngleVar
;

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 

Declaration:

PROCEDURE   CallTool
( toolID:INTEGER ) ;

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 

Declaration:

PROCEDURE   ClosePDFDocument
;

Description:

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



  DoMenuText Command 

Declaration:

PROCEDURE   DoMenuText
( menuItem:STRING ) ;

Special Notes:

DoMenuText is obsolete as of VectorWorks8.0

Description:

Obsolete procedure.

Parameters:

menuItem Menu item name.

See Also:

DoMenuTextByName  



  DoMenuTextByName Command 

Declaration:

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

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 

Declaration:

FUNCTION   ExportPDFPages
( savedViewNameStr:STRING ) :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 

Declaration:

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

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 

Declaration:

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

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 

Declaration:

PROCEDURE   NoAngleVar
;

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 

Declaration:

FUNCTION   OpenPDFDocument
( inFilenameStr:STRING ) :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 

Declaration:

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

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 

Declaration:

PROCEDURE   PopAttrs
;

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 

Declaration:

FUNCTION   PrintUsingPrintDialog
: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 

Declaration:

FUNCTION   PrintWithoutUsingPrintDialog
: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 

Declaration:

PROCEDURE   PushAttrs
;

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 

Declaration:

PROCEDURE   Relative
;

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 

Declaration:

PROCEDURE   Run
( p:PROCEDURE ) ;

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 

Declaration:

PROCEDURE   SetTool
( theTool:INTEGER ) ;

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