ClrMessage | Utility |
Declaration:
PROCEDURE ClrMessage
; Description:
Procedure ClrMessage closes the message palette.
ColorIndexToRGB | Utility |
Declaration:
PROCEDURE ColorIndexToRGB
( color :INTEGER; VAR red :LONGINT; VAR green :LONGINT; VAR blue :LONGINT ) ; Description:
Procedure ColorIndexToRGB converts the VectorWorks palette colors from the colors' palette position index to its red, green, and blue component values.Parameters:
color Color index. red RGB color component value. green RGB color component value. blue RGB color component value. Example:
ColorIndexToRGB(45,r,g,b); {returns the color value components of the color at position 45}
Date | Utility |
Declaration:
FUNCTION Date
( dateFormat :INTEGER; infoFormat :INTEGER ) :STRING ; Description:
Function Date returns a formatted date and time string.
Table - Date String Formats
Date Style Constant Return date 0 Return date/time 1 Return time 2
Table - Date Formats
Date Style Constant Full Date 0 Abbreviated Date 1 Short Date 2
Parameters:
dateFormat Date format style. infoFormat Date string format style. Example:
{ All examples are for the date Friday, } { Nov. 18, 1988 and the time 10:42:24 AM } Date(0,1); {returns Friday, November 18, 1988 10:42:24 AM} Date(0,0); {returns Friday, November 18, 1988} Date(2,2); {returns 10:42:24 AM} Date(2,1); {returns 11/18/88 10:42:24 AM}
FndError | Utility |
Declaration:
FUNCTION FndError
:BOOLEAN ; Description:
Function FndError returns whether an error has occurred within a VectorScript subroutine. Provided as a debugging tool, FndError receives notification after execution of every line of code whether an error has occurred.
GetPickObjectInfo | Utility |
Declaration:
FUNCTION GetPickObjectInfo
( pX :REAL; pY :REAL; VAR h :HANDLE; VAR subH :HANDLE; VAR message :INTEGER ) :BOOLEAN ; Description:
Function GetPickObjectInfo returns a handle to an object found at a user selected point.
Parameter subH returns a handle to a sub-selectable object(e.g., a symbol in a wall) if such an object exists. Parameter message is currently unused, and always returns 0.
Parameters:
p Coordinate location to test for object. h Returns handle to object. subH Returns handle to sub selectable object. message Resereved for future use. Specify a dummy INTEGER variable. Example:
WHILE NOT GetPickObjectInfo(pX,pY,hObject,hSymbol,dummyVar) DO BEGIN GetPt(pX,pY); END;
GetScreen | Utility |
Declaration:
PROCEDURE GetScreen
( VAR x1 :INTEGER; VAR y1 :INTEGER; VAR x2 :INTEGER; VAR y2 :INTEGER ) ; Description:
Procedure GetScreen returns the top-left and bottom-right corners of the display screen. These values will change as different sized screens are used. This procedure can be utilized to aid in development of dialog boxes, or as a check of screen size for sizing or displaying custom dialogs.Parameters:
x1 Returns X coordinate of top left of screen. y1 Returns Y coordinate of top left of screen. x2 Returns X coordinate of bottom right of screen. y2 Returns Y coordinate of bottom right of screen.
GetVersion | Utility |
Declaration:
PROCEDURE GetVersion
( VAR major :INTEGER; VAR minor :INTEGER; VAR plat :INTEGER; VAR bug :INTEGER ) ; Description:
Returns version information about the VectorWorks application. Parametermajor returns the major version number of the application. Parameters minor and plat return minor version information. Parameter GetVersion returns the OS platform on which VectorWorks is running.
Parameters:
major Returns major version number of application. minor Returns minor version number of application. plat Returns maintenance version number of application. bug Returns platform of application. Example:
GetVersion(mcMajor,mcMinor,mcMaint,plat);
LNewObj | Utility |
Declaration:
FUNCTION LNewObj
:HANDLE ; Description:
Function LNewObj returns a handle to the last object created by a VectorScript creation function or procedure. It returns NIL if no objects have been created by VectorScript in this session.
Example:
Message | Utility |
Declaration:
PROCEDURE Message
( z1 :ANY; z2 :ANY; ... :ANY; zN :ANY ) ; Description:
Procedure Message displays a floating message palette onscreen. Parameters z1 thru zN specify the values to be displayed in the palette. Parameters can be any supported data type or variables.
If Message is called and the palette is already displayed, the value in the palette will be replaced by the new information.
Example:
Message('Hello, world'); Message('The Number of objects was :',theNumber); {displays a string using the variable value}
NameUndoEvent | Utility |
Declaration:
PROCEDURE NameUndoEvent
( eventName:STRING ) ; Description:
Procedure NameUndoEvent names the undo event that is currently being built by VectorScript execution. Parameter eventName is the name of the undo event.Parameters:
eventName Name of undo event.
PickObject | Utility |
Declaration:
FUNCTION PickObject
( pX :REAL; pY :REAL ) :HANDLE ; Description:
Function PickObject returns a handle to an object in the document. The function receives a coordinate location, specified by parameter p, and checks this location for the presence of an object. If an object exists at the location, the function returns a handle to the object.
Parameters:
p Coordinate location to test for object. Example:
objectHandle:=PickObject(2,5);
Random | Utility |
Declaration:
FUNCTION Random
:REAL ; Description:
Procedure Random returns a random number between 0.0 and 1.0.
ReDraw | Utility |
Declaration:
PROCEDURE ReDraw
; Description:
Procedure ReDraw invokes a screen redraw of newly created objects in the active VectorWorks document. If new objects are to be manipulated using procedures which operate on selected objects, a call to ReDraw should precede the selected object routines to ensure that all new objects are correctly identified.
ReDrawAll | Utility |
Declaration:
PROCEDURE ReDrawAll
; Description:
Procedure ReDrawAll invokes a full screen redraw of the active VectorWorks document. ReDrawAll is used when the document view needs to be refreshed prior to additional operation being performed in the document.
RGBToColorIndex | Utility |
Declaration:
PROCEDURE RGBToColorIndex
( red :LONGINT; green :LONGINT; blue :LONGINT; VAR color :INTEGER ) ; Description:
Procedure RGBToColorIndex converts the VectorWorks palette colors from its' red, green, and blue component values to the colors' palette position index. Parameters red, green, and blue return the color components of the swatch, and parameter color is the palette position ID of the color swatch.
Parameters:
red RGB color component value. green RGB color component value. blue RGB color component value. color Color index. Example:
ColorIndexToRGB(45,r,g,b);
SetCurrentObject | Utility |
Declaration:
PROCEDURE SetCurrentObject
( h:HANDLE ) ; Description:
Procedure SetCurrentObject sets the referenced object to be the current object of the document. The current object is defined as the last object created, and can be referenced by LNewObj.
Parameters:
h Handle to object.
SetMaximumUndoEvents | Utility |
Declaration:
PROCEDURE SetMaximumUndoEvents
( events:INTEGER ) ; Description:
Procedure SetMaximumUndoEvents sets the maximum number of undo events that can be stored in the undo table. Parameter events specifies the number of undos. Setting this value to zero effectively turns off undo.Parameters:
events Number of undo events to store.
Suppress | Utility |
Declaration:
PROCEDURE Suppress
; Special Notes:
Suppress is obsolete as of VectorWorks 8.0
Description:
Obsolete. Unsupported.
SysBeep | Utility |
Declaration:
PROCEDURE SysBeep
; Description:
Procedure SysBeep uses the current system prompt sound to alert the user.
UndoOff | Utility |
Declaration:
PROCEDURE UndoOff
; Description:
Procedure UndoOff clears the undo table and suspends undo for the remainder of the VectorScript procedure. The undo system resumes after the procedure is completed.
Update | Utility |
Declaration:
PROCEDURE Update
; Special Notes:
Update is obsolete as of VectorWorks 8.0
Description:
Obsolete. Unsupported.
Wait | Utility |
Declaration:
PROCEDURE Wait
( seconds:INTEGER ) ; Description:
Procedure Wait delays execution in VectorScript for a specified number of seconds.
When paused, a VectorScript routine stops at the point where Wait is encountered.
Parameters:
seconds Number of seconds to pause script execution. Example:
Wait(3); {pauses execution for 3 seconds}