| BeginContext | Utility VectorWorks12.5 |
VectorScript Declaration:
PROCEDURE BeginContext
; Python:
return None
def vs.BeginContext(): Description:
Use this function in conjuction with EndContext to starts logging changes that are made until the EndContext is reached.See Also:
EndContext
| CallToolByIndex | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION CallToolByIndex
( toolIndex:INTEGER ) :BOOLEAN ; Python:
return BOOLEAN
def vs.CallToolByIndex(toolIndex): Description:
Similar to CallTool. Takes the internal ID of a tool.
| CallToolByName | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION CallToolByName
( toolName:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.CallToolByName(toolName): Description:
Similar to CallTool, but takes name rather than ID. Supports plug-in tools (but not yet internal tools).
| ClrMessage | Utility MiniCAD |
VectorScript Declaration:
PROCEDURE ClrMessage
; Python:
return None
def vs.ClrMessage(): Description:
Procedure ClrMessage closes the message palette.
| ColorIndexToRGB | Utility MiniCAD6.0 |
VectorScript Declaration:
PROCEDURE ColorIndexToRGB
( color :INTEGER; VAR red :LONGINT; VAR green :LONGINT; VAR blue :LONGINT ) ; Python:
return (red, green, blue)
def vs.ColorIndexToRGB(color): Description:
Procedure ColorIndexToRGB converts the Vectorworks palette colors from the colors' palette position index to its red, green, and blue component values. RGB values are in the range of 0~65535.
A color table listing with associated index values can be found in the Appendix.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}
| ColorIndexToRGBN | Utility Vectorworks 2010 |
VectorScript Declaration:
PROCEDURE ColorIndexToRGBN
( color :INTEGER; VAR red :LONGINT; VAR green :LONGINT; VAR blue :LONGINT; ignoreBlackBackground :BOOLEAN ) ; Python:
return (red, green, blue)
def vs.ColorIndexToRGBN(color, ignoreBlackBackground): Description:
Procedure ColorIndexToRGBN converts the Vectorworks palette colors from the colors' palette position index to its red, green, and blue component values. RGB values are in the range of 0~65535.Parameter ignoreBlackBackground specifies whether the black background preference should be ignored. If set to TRUE, black and white indexes will not be inverted in black background.
A color table listing with associated index values can be found in the Appendix.Parameters:
color Color index red RGB color component value. green RGB color component value. blue RGB color component value. ignoreBlackBackground Ignore black background preference setting or not. Example:
ColorIndexToRGBN(257,r,g,b,TRUE); {returns the color value components of the color index 257 (black)} {Because ignoreBlackBackground is set to TRUE, the result } {will always be black RGB color regardless of the black background }{preference setting.}
| CreateUUID | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION CreateUUID
:STRING ; Python:
return STRING
def vs.CreateUUID(): Description:
Creates a string representing universe unique identifier. The string is in the form: '{00000000-0000-0000-0000-000000000000}'
| Date | Utility MiniCAD |
VectorScript Declaration:
FUNCTION Date
( dateFormat :INTEGER; infoFormat :INTEGER ) :STRING ; Python:
return STRING
def vs.Date(dateFormat, infoFormat): Description:
Function Date returns a formatted date and time string.
Table - Values for dateFormat parameter:
Date Format Constant Full Date 0 Abbreviated Date 1 Short Date 2
Table - Values for infoFormat parameter:
Date/Time Constant Date only 0 Date and Time 1 Time only 2
Parameters:
dateFormat Specify how verbose or compact the resulting string is. infoFormat Specify if result should contain date, time or both. 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}
| DelSavedSetting | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION DelSavedSetting
( category :STRING; setting :STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.DelSavedSetting(category, setting): Description:
Delete saved settings.Parameters:
category The category for the setting. setting The setting to be deleted. Result:
Return TRUE when successful.See Also:
DelSavedSettings SetSavedSetting GetSavedSetting
| DelSavedSettings | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION DelSavedSettings
( category:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.DelSavedSettings(category): Description:
Delete all saved settings in the specified category.Parameters:
category The category to be deleted. Result:
Return TRUE when successful.See Also:
DelSavedSetting SetSavedSetting GetSavedSetting
| DisableModules | Utility VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE DisableModules
( modules:LONGINT ) ; Python:
return None
def vs.DisableModules(modules): Description:
Disables modules. The modules parameter is a bitfield indicating which modules to disable.Parameters:
modules This modules parameter is a LONGINT value which contains a bit for each possible product module. If a module is enabled, then the corresponding bit is set to 1. If that module is disabled, then its bit is 0. The table below contains selectors that can be used to interpret the results of this function. To determine if a module is enabled, do a bitwise "and" operation with the selector and the value returned by this function. See the usage example below.
Table - GetEnabledModules Selectors
Module Selector Description Foundation 0 Vectorworks general purpose CAD. RenderWorks 1 Advanced rendering features, lighting, textures. Architect 2 Architectural features including advanced window, door, wall framing, HVAC. Landmark 4 Site modeling and landscape design module. Spotlight 8 Theater lighting, set, and scenic design features. Mechanical 16 Mechanical engineering module for designers and fabricators. Pro 32 Foundation for European market.
| DisplayContextHelpOfCurrentPlugin | Utility VectorWorks12.0 |
VectorScript Declaration:
PROCEDURE DisplayContextHelpOfCurrentPlugin
; Python:
return None
def vs.DisplayContextHelpOfCurrentPlugin(): Description:
This function will display the context help of the plug-in that is considered 'current'. This could be a command plug-in that has a dialog open, or a tool plug-in that is active.
| DisplayContextualHelp | Utility VectorWorks12.0 |
VectorScript Declaration:
FUNCTION DisplayContextualHelp
( Identifier:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.DisplayContextualHelp(Identifier): Description:
Using the identifier string for a GUI element given by the Contextual Help Manager displays the associated contextual help. This could be a WebWorks webpage, a Internet webpage or even a local file.
| DisplayOrganizationDialog | Utility VectorWorks12.0 |
VectorScript Declaration:
PROCEDURE DisplayOrganizationDialog
( tabToSelect:INTEGER ) ; Python:
return None
def vs.DisplayOrganizationDialog(tabToSelect): Description:
Displays the organization dialog with the specified integer as the initially slected tab.
0: The most recently displayed tab is selected
1: The Classes tab is selected .
2: The Design Layers tab is selected.
3: The Sheet Layers tab is selected.
4: The Viewports tab is selected.
5: The Saved Views tab is selected.
Parameters:
tabToSelect The tab to be initially selected.
| EditCriteriaWithUI | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION EditCriteriaWithUI
( VAR criteria:DYNARRAY[] of CHAR ) :INTEGER ; Python:
return (INTEGER, criteria)
def vs.EditCriteriaWithUI(criteria): Description:
Edit a criteria string with Edit Criteria Dialog.Parameters:
criteria Pass in a criteria to be edited, and output the modified criteria if the function result is TRUE. Result:
The funtion returns the following values:
0 - failed. The input criteria is incorrect.
1 - The edit was OK
2 - The edit was Cancel
| EncryptAllPlugins | Utility Vectorworks 2014 |
VectorScript Declaration:
PROCEDURE EncryptAllPlugins
; Python:
return None
def vs.EncryptAllPlugins(): Description:
This will do batch encryption of all VectorScript plug-ins in the Plug-ins folder.
| EncryptPlugin | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION EncryptPlugin
( fullPath:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.EncryptPlugin(fullPath): Description:
Encrypt one VectorScript Plug-in file.
| EndContext | Utility VectorWorks12.5 |
VectorScript Declaration:
PROCEDURE EndContext
( acceptOrReject:INTEGER ) ; Python:
return None
def vs.EndContext(acceptOrReject): Description:
Use this function in conjuction with BeginContext to have VW automatically accept or reject any changes that were made during the Begin/End block.Parameters:
acceptOrReject Specify 0 to reject changes or 1 to accept changes See Also:
BeginContext
| ExportImageFile | Utility Vectorworks 2015 |
VectorScript Declaration:
FUNCTION ExportImageFile
( hHmage :HANDLE; filePath :DYNARRAY[] of CHAR ) :BOOLEAN ; Python:
return BOOLEAN
def vs.ExportImageFile(hHmage, filePath): Description:
Export the specified Image object in Vectorworks as an image file.Parameters:
hHmage The handle of the image object to be exported. filePath Full path to the output image file.
| FndError | Utility MiniCAD |
VectorScript Declaration:
FUNCTION FndError
:BOOLEAN ; Python:
return BOOLEAN
def vs.FndError(): 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.
| ForEachObjectAtPoint | Utility VectorWorks 2008 |
VectorScript Declaration:
PROCEDURE ForEachObjectAtPoint
( actionFunc :PROCEDURE; objOptions :INTEGER; travOptions :INTEGER; locX :REAL; locY :REAL; pickRadius :REAL ) ; Python:
return None
def vs.ForEachObjectAtPoint(actionFunc, objOptions, travOptions, loc, pickRadius): Description:
Performs an action for each object at the specified point in the drawing. This call was implemented to get past the practical limitations of PickObject, which only finds the topmost object. This call will find all of the objects at a given point.
"actionFunc" should actually be a function, not a procedure as the declaration indicates.
If the callback function returns FALSE, ForEachObjectAtPoint will not process any more objects at the specified point.
Table - ForEachObjectAtPoint Selectors
Object OptionsOption Selector Description All objects 0 Visible Objects only 1 Selected Objects only 2 Unlocked objects only 4 Traversal OptionsOption Selector Description Traverse Shallow 0 Traverse Groups 1 Traverse inside groups Example:
PROCEDURE Example; VAR gx1, gy1 : REAL; FUNCTION DoIt(h1 :HANDLE) :BOOLEAN; BEGIN DSelectAll; SetSelect(h1); Redraw; Wait(1); END; BEGIN GetPt(gx1, gy1); ForEachObjectAtPoint(DoIt, 0, 0, gx1, gy1, 5); END; RUN(Example);See Also:
PickObject GetPickObjectInfo
| ForEachObjectInLayer | Utility VectorWorks8.5 |
VectorScript Declaration:
PROCEDURE ForEachObjectInLayer
( actionFunc :PROCEDURE; objOptions :INTEGER; travOptions :INTEGER; layerOptions :INTEGER ) ; Python:
return None
def vs.ForEachObjectInLayer(actionFunc, objOptions, travOptions, layerOptions): Description:
Traverses through all objects according to specified search options and applies the specified action to each object. The 'actionFunc' procedure should return false to continue with next object, or return true to stop the traversal.
Table - ForEachObjectInLayer Selectors
Object OptionsOption Selector Description All objects 0 Visible Objects only 1 Selected Objects only 2 Unlocked objects only 4 Traversal OptionsOption Selector Description Traverse Shallow 0 Traverse Groups 1 Traverse inside groups Traverse Deep 2 Traverse all containers (walls, extrudes, sweeps, etc) Layer OptionsOption Selector Description Current layer 0 All layers 1 Visible layers 2 Editable layers 4 Snappable layers 8 Parameters:
actionFunc Subroutine which performs operation on found objects. objOptions Object selection option index. travOptions Search options index. layerOptions Layer selection option index. Example:
PROCEDURE Example; FUNCTION MakeItRed(h :HANDLE) :BOOLEAN; VAR r, g, b :LONGINT; BEGIN ColorIndexToRGB(7, r, g, b); SetFillBack(h, r, g, b); END; BEGIN ForEachObjectInLayer(MakeItRed, 2, 0, 4); END; RUN(Example);
| ForEachObjectInList | Utility VectorWorks8.5 |
VectorScript Declaration:
PROCEDURE ForEachObjectInList
( actionFunc :PROCEDURE; objOptions :INTEGER; travOptions :INTEGER; list :HANDLE ) ; Python:
return None
def vs.ForEachObjectInList(actionFunc, objOptions, travOptions, list): Description:
Processes all items in the specified list and and applies the specified action to each item.
Table - ForEachObjectInList Selectors
Object Options Option Selector Description All objects 0 Visible Objects only 1 Selected Objects only 2 Locked objects only 4 Traversal OptionsOption Selector Description Traverse Shallow 0 Traverse Groups 1 Traverse inside groups Traverse Deep 2 Traverse all containers (walls, extrudes, sweeps, etc) Parameters:
actionFunc Subroutine which performs operation on found objects. objOptions Object selection option index. travOptions Search options index. list Handle to first item in list. Example:
PROCEDURE Example; CONST pioName = 'Complex Window 2'; parameter = 'MeasureHeight'; value = 'Head of Window'; FUNCTION DoIt(h :HANDLE) :BOOLEAN; BEGIN h := FInSymDef(h); SetRField(h, pioName, parameter, value); END; BEGIN ForEachObjectInList(DoIt, 0, 0, FSymDef); END; RUN(Example);
| GetActiveSerialNumber | Utility VectorWorks10.0 |
VectorScript Declaration:
FUNCTION GetActiveSerialNumber
:STRING ; Python:
return STRING
def vs.GetActiveSerialNumber(): Description:
Gets the currently active serial number.
| GetArrayDimensions | Utility VectorWorks9.0 |
VectorScript Declaration:
PROCEDURE GetArrayDimensions
( arrayname :ARRAY; VAR rowStart :INTEGER; VAR rowEnd :INTEGER; VAR columnStart :INTEGER; VAR columnEnd :INTEGER ) ; Python:
return (rowStart, rowEnd, columnStart, columnEnd)
def vs.GetArrayDimensions(arrayname): Description:
Returns the dimensions of the specified array.Parameters:
arrayname Name of array. rowStart Start row value. rowEnd End row value. columnStart Start column value. columnEnd End column value.
| GetCallBackInval | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION GetCallBackInval
:BOOLEAN ; Python:
return BOOLEAN
def vs.GetCallBackInval(): Description:
Returns whether callbacks are invalidating portions of the screen that are being changed.
| GetClosestPt | Utility VectorWorks8.5 |
VectorScript Declaration:
PROCEDURE GetClosestPt
( VAR obj :HANDLE; ptX :REAL; ptY :REAL; VAR index :INTEGER; VAR containedObj :LONGINT ) ; Python:
return (obj, index, containedObj)
def vs.GetClosestPt(pt): Description:
Returns the index number of the object closest to the specified location.
The index value will return 0 if no vertex can be determined as closest, and will return -1 if the object does not support GetClosestPt.
For container objects, GetClosestPt has distinct behaviors. For walls, if the closest vertex is
is in a subobject, obj will be set to a handle to the subobject. For symbols and plug-in objects, an index to the sub-object will be returned via parameter containedObj.
GetClosestPt supports only 2D objects.Parameters:
obj Handle to object. pt Coordinate location of comparison point. index Index to vertex. containedObj Index of sub-object. Example:
PROCEDURE GetClosestPtExample; VAR obj :HANDLE; ptX, ptY :REAL; index :INTEGER; containedObj :LONGINT; BEGIN GetPt(ptX, ptY); obj := PickObject(ptX, ptY); GetClosestPt(obj, ptX, ptY, index, containedObj); SetPenFore(obj, 65535, 0, 0); END; RUN(GetClosestPtExample);
| GetClosestSide | Utility VectorWorks8.5 |
VectorScript Declaration:
PROCEDURE GetClosestSide
( obj :HANDLE; ptX :REAL; ptY :REAL; VAR index1 :INTEGER; VAR index2 :INTEGER ) ; Python:
return (index1, index2)
def vs.GetClosestSide(obj, pt): Description:
Returns the indices of the vertices that define the side closest to the specified location.
GetClosestSide supports only 2D objects. If the object is unsupported, -1 will be returned as the index values.Parameters:
obj Handle to object. pt Coordinates of location. index1 Index of first vertex of closest side. index2 Index of second vertex of closest side.
| GetCurrentLocalization | Utility Vectorworks 2010 |
VectorScript Declaration:
PROCEDURE GetCurrentLocalization
( VAR language :STRING; VAR subLanguage :STRING ) ; Python:
return (language, subLanguage)
def vs.GetCurrentLocalization(): Description:
Get the Vectorworks language in the ISO 639-3 draft standard Language ID and sublanguage is unused and will be the empty string reserved for future use for a regional dialect.
Currently this will always return the same language for a given installation of Vectorworks.Parameters:
language Output parameter. Returns language in ISO 639-3 draft standard Language ID. subLanguage Output parameter. Unused. Returns empty string.
| GetCurrentMode | Utility VectorWorks10.0 |
VectorScript Declaration:
FUNCTION GetCurrentMode
:INTEGER ; Python:
return INTEGER
def vs.GetCurrentMode(): Description:
Returns the current application protection mode.
Return values:
0 - Mode Not Set
1 - Full Mode
2 - Demo Mode
4 - Education Mode
8 - Student Mode
16 - Viewer Mode
32 - Unlicensed Mode
64 - Banner Mode
128 - Watermark New Files Mode
256 - Print Watermark Mode
512 - Save Educational File Format Mode
1024 - Open Educational File Format Mode
2048 - Vector Script Export Mode
4096 - Beta Serial Number Mode
| GetEnabledModules | Utility VectorWorks10.0 |
VectorScript Declaration:
FUNCTION GetEnabledModules
:LONGINT ; Python:
return LONGINT
def vs.GetEnabledModules(): Description:
Determines which combination of product modules are currently enabled.
This function returns a LONGINT value which contains a bit for each possible product module. If a module is enabled, then the corresponding bit will be set to 1. If that module is disabled, then its bit will be 0. The table below contains selectors that can be used to interpret the results of this function. To determine if a module is enabled, do a bitwise "and" operation with the selector and the value returned by this function. See the usage example below.
Table - GetEnabledModules Selectors
Module Selector Description Foundation 0 Vectorworks general purpose CAD. RenderWorks 1 Advanced rendering features, lighting, textures. Architect 2 Architectural features including advanced window, door, wall framing, HVAC. Landmark 4 Site modeling and landscape design module. Spotlight 8 Theater lighting, set, and scenic design features. Mechanical 16 Mechanical engineering module for designers and fabricators. Pro 32 Foundation for European market.
Result:
A LONGINT bitfield value with a bit for each possible product module.Example:
PROCEDURE testModules; {----------------------------------------------------------} FUNCTION bittest(value, mask :LONGINT) :BOOLEAN; VAR bit :INTEGER; BEGIN bittest := FALSE; bit := 31; { 2 ^ 31 is high order bit of a LONGINT argument. } WHILE ((bit > -1) & (bittest = false)) DO BEGIN IF value >= (2 ^ bit) THEN BEGIN value := value - (2 ^ bit); IF (2 ^ bit) = mask THEN bittest := TRUE; END; bit := bit - 1; END; END; {----------------------------------------------------------} FUNCTION IsModuleEnabled(whichModule :LONGINT) :BOOLEAN; VAR enabledModules :LONGINT; BEGIN enabledModules := GetEnabledModules; IsModuleEnabled := bittest(enabledModules, whichModule) END; BEGIN IF IsModuleEnabled(4) & IsModuleEnabled(1) THEN BEGIN { Landmark and Renderworks are both enabled. } { ... } END; END; RUN(testModules);See Also:
DisableModules
| GetMainDisplayBounds | Utility Vectorworks 2014 |
VectorScript Declaration:
PROCEDURE GetMainDisplayBounds
( VAR outTop :INTEGER; VAR outLeft :INTEGER; VAR outBottom :INTEGER; VAR outRight :INTEGER ) ; Python:
return (outTop, outLeft, outBottom, outRight)
def vs.GetMainDisplayBounds(): Description:
Returns the bounds of the main display device (Macintosh Only).
| GetNetAdapterInfo | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION GetNetAdapterInfo
( adapterIndex :INTEGER; VAR outMacAddr :STRING ) :BOOLEAN ; Python:
return (BOOLEAN, outMacAddr)
def vs.GetNetAdapterInfo(adapterIndex): Description:
Return information about the network adapter
| GetOSVersion | Utility VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE GetOSVersion
( VAR major :LONGINT; VAR minor :LONGINT; VAR incr :LONGINT ) ; Python:
return (major, minor, incr)
def vs.GetOSVersion(): Description:
Returns the version of the current operating system.Parameters:
major Major revision number minor Minor revision number incr Increment revision number Example:
PROCEDURE ShowVersionInfo; VAR osMajor, osMinor, osIncr :LONGINT; vwMajor, vwMinor, vwMaint, platform: INTEGER; str :STRING; BEGIN str := ''; GetOSVersion(osMajor, osMinor, osIncr); GetVersion(vwMajor, vwMinor, vwMaint, platform); If platform = 1 then BEGIN str := Concat(str, 'Platform: Macintosh', chr(13)); IF osMajor = 0 THEN osMajor := 10; str := Concat(str, 'OS Version: ', osMajor, '.', osMinor, '.', osIncr, chr(13)); end else if platform = 2 then BEGIN str := Concat(str, 'Platform: Windows', chr(13)); IF (osMajor = 4) & (osMinor = 10) THEN str := Concat(str, 'OS Version: 98 SE', chr(13)) ELSE IF (osMajor = 5) & (osMinor = 1) THEN str := Concat(str, 'OS Version: XP', chr(13)) ELSE str := Concat(str, 'OS Version: ', osMajor, '.', osMinor, '.', osIncr, chr(13)); END; str := Concat(str, 'VW Version: ', vwMajor, '.', vwMinor, '.', vwMaint); AlrtDialog(str); END; RUN(ShowVersionInfo);
| GetPaletteVisibility | Utility VectorWorks10.0 |
VectorScript Declaration:
FUNCTION GetPaletteVisibility
( paletteName:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.GetPaletteVisibility(paletteName): Description:
Gets the visibility state of a palette.Parameters:
paletteName Name of the palette Result:
Returns true if the palette is visible, false otherwise.See Also:
SetPaletteVisibility
| GetPickObjectInfo | Utility VectorWorks8.0 |
VectorScript Declaration:
FUNCTION GetPickObjectInfo
( pX :REAL; pY :REAL; VAR h :HANDLE; VAR subH :HANDLE; VAR message :INTEGER ) :BOOLEAN ; Python:
return (BOOLEAN, h, subH, message)
def vs.GetPickObjectInfo(p): 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;See Also:
PickObject ForEachObjectAtPoint
| GetPlantToolInitialized | Utility VectorWorks 2008 |
VectorScript Declaration:
FUNCTION GetPlantToolInitialized
:BOOLEAN ; Python:
return BOOLEAN
def vs.GetPlantToolInitialized(): Description:
Returns whether or not the plant tool has been initialized or not.
| GetPlantToolPlacementMode | Utility VectorWorks 2008 |
VectorScript Declaration:
FUNCTION GetPlantToolPlacementMode
:INTEGER ; Python:
return INTEGER
def vs.GetPlantToolPlacementMode(): Description:
This returns the current placement mode stored in the plant tool
| GetPlantToolPlantName | Utility VectorWorks 2008 |
VectorScript Declaration:
FUNCTION GetPlantToolPlantName
:STRING ; Python:
return STRING
def vs.GetPlantToolPlantName(): Description:
Returns the name of the current plant that is stored in the plant tool.
| GetPlantToolSpacing | Utility VectorWorks 2008 |
VectorScript Declaration:
FUNCTION GetPlantToolSpacing
:REAL ; Python:
return REAL
def vs.GetPlantToolSpacing(): Description:
This returns the spacing that is currently stored in the plant tool.
| GetProduct | Utility VectorWorks9.0 |
VectorScript Declaration:
PROCEDURE GetProduct
( VAR product :INTEGER; VAR modules :LONGINT ) ; Python:
return (product, modules)
def vs.GetProduct(): Description:
Identifies what NNA products and product packages are available in the current product installation.
Obsolete as of 10. Use GetEnabledModules instead.Parameters:
product Product index. modules Package index. See Also:
GetEnabledModules
| GetSavedSetting | Utility VectorWorks12.0 |
VectorScript Declaration:
FUNCTION GetSavedSetting
( category :STRING; setting :STRING; VAR value :STRING ) :BOOLEAN ; Python:
return (BOOLEAN, value)
def vs.GetSavedSetting(category, setting): Description:
Reads a value from the saved settnigs file. This can be used to remember various user settings between running sessions of Vectorworks. For example, a script may want to remember a dialog's position or a font settings. The saved settings should not be used for critical information, but rather for convenience settings.
If the settings file is lost or damaged the script should revert to a reasonable default value, and typically this would not warrant an alert dialog.Result:
Returns true is the requested setting is found and read from the saved settings file, false otherwise.
| GetScreen | Utility MiniCAD |
VectorScript Declaration:
PROCEDURE GetScreen
( VAR x1 :INTEGER; VAR y1 :INTEGER; VAR x2 :INTEGER; VAR y2 :INTEGER ) ; Python:
return (x1, y1, x2, y2)
def vs.GetScreen(): 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. Example:
PROCEDURE Example; VAR x1, y1, x2, y2 :INTEGER; BEGIN GetScreen(x1, y1, x2, y2); Message(x1,' ',y1,' ',x2,' ',y2); END; RUN(Example);
| GetTextWidthInPixels | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION GetTextWidthInPixels
( inTextMeasure:STRING ) :INTEGER ; Python:
return INTEGER
def vs.GetTextWidthInPixels(inTextMeasure): Description:
Returns the length of a string in the current port based on the port's text settings.
| GetTickCount | Utility VectorWorks8.5 |
VectorScript Declaration:
FUNCTION GetTickCount
:LONGINT ; Python:
return LONGINT
def vs.GetTickCount(): Description:
Returns number of ticks (1/60th second) since system startup.Example:
PROCEDURE Example; VAR tick1, tick2 :LONGINT; BEGIN tick1 := GetTickCount; ForEachObject(ResetObject, (T=86)); tick2 := GetTickCount; Message('Seconds elapsed equals: ', (tick2 - tick1) / 60); END; Run(Example);
| GetVersion | Utility MiniCAD7.0 |
VectorScript Declaration:
PROCEDURE GetVersion
( VAR major :INTEGER; VAR minor :INTEGER; VAR maintenance :INTEGER; VAR platform :INTEGER ) ; Python:
return (major, minor, maintenance, platform)
def vs.GetVersion(): Description:
Returns version information about the Vectorworks application. Parameter major returns the major version number of the application. Parameters minor and maintenance return minor version information. Parameter platform returns the OS platform on which Vectorworks is running (1 = Macintosh, 2 = Windows).
Vectorworks 2008 has version major number 13, 2009 - 14 and so on.
For example:
Vectorworks 8.0.1 running on a Macintosh would return:
major: 8
minor: 0
maintenance: 1
platform: 1
Parameters:
major Returns major version number of application. minor Returns minor version number of application. maintenance Returns maintenance version number of application. platform Returns platform of application. Example:
PROCEDURE Example; VAR osMajor, osMinor, osIncr :LONGINT; appMajor, appMinor, appMaint, platform :INTEGER; platformStr :STRING; BEGIN GetVersion(appMajor, appMinor, appMaint, platform); GetOSVersion(osMajor, osMinor, osIncr); IF (platform = 1) THEN platformStr := 'MacOS' ELSE platformStr := 'Windows'; Message('Vectorworks ', appMajor, '.', appMinor, '.', appMaint, ' running on ', platformStr, ' ', osMajor, '.', osMinor, '.', osIncr); END; RUN(Example);
| GetVersionEx | Utility Vectorworks 2010 |
VectorScript Declaration:
PROCEDURE GetVersionEx
( VAR major :INTEGER; VAR minor :INTEGER; VAR maintenance :INTEGER; VAR platform :INTEGER; VAR buildNum :LONGINT ) ; Python:
return (major, minor, maintenance, platform, buildNum)
def vs.GetVersionEx(): Description:
Returns version information about the Vectorworks application. Parameter major returns the major version number of the application. Parameters minor and maintenance return minor version information. Parameter platform returns the OS platform on which Vectorworks is running (1 = Macintosh, 2 = Windows).
Parameter buildNum returns the build number of the version.
Vectorworks 2008 has version major number 13, 2009 - 14 and so on.
For example:
Vectorworks 2010.0.1 running on a Macintosh would return:
major: 15
minor: 0
maintenance: 1
platform: 1
buildNum: 95668
Parameters:
major Returns major version number of application. minor Returns minor version number of application. maintenance Returns maintenance version number of application. platform Returns platform of application. buildNum Returns the build number of application. Example:
PROCEDURE Example; VAR osMajor, osMinor, osIncr :LONGINT; appMajor, appMinor, appMaint, platform, buildNum :INTEGER; platformStr :STRING; BEGIN GetVersionEx(appMajor, appMinor, appMaint, platform, buildNum); GetOSVersion(osMajor, osMinor, osIncr); IF (platform = 1) THEN platformStr := 'MacOS' ELSE platformStr := 'Windows'; Message('Vectorworks ', appMajor, '.', appMinor, '.', appMaint, ' build ', buildNum, ' running on ', platformStr, ' ', osMajor, '.', osMinor, '.', osIncr); END; RUN(Example);
| GetWorkingPlane | Utility VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE GetWorkingPlane
( VAR x :REAL; VAR y :REAL; VAR z :REAL; VAR xRotation :REAL; VAR yRotation :REAL; VAR zRotation :REAL ) ; Python:
return (x, y, z, xRotation, yRotation, zRotation)
def vs.GetWorkingPlane(): Description:
Retrieves the location and orientation of the working plane.Parameters:
x X-coordinate of the working plane y Y-coordinate of the working plane z Z-coordinate of the working plane xRotation X-coordinate value of the rotation yRotation Y-coordinate value of the rotation zRotation Z-coordinate value of the rotation See Also:
SetWorkingPlane
| GetWorkingPlaneMat | Utility Vectorworks 2011 |
VectorScript Declaration:
PROCEDURE GetWorkingPlaneMat
( refID :LONGINT; VAR outCenterPtX :REAL; VAR outCenterPtY :REAL; VAR outCenterPtZ :REAL; VAR outNormalX :REAL; VAR outNormalY :REAL; VAR outNormalZ :REAL; VAR outUVecX :REAL; VAR outUVecY :REAL; VAR outUVecZ :REAL ) ; Python:
return (outCenterPt, outNormal, outUVec)
def vs.GetWorkingPlaneMat(refID): Description:
Get the specified working plane matrix.Parameters:
refID Reference ID of the working plane. outCenterPt Output. The working plane center. outNormal Output. The working plane normal. outUVec Output. The U Vector of the plane.
| GetWorkingPlaneN | Utility Vectorworks 2011 |
VectorScript Declaration:
PROCEDURE GetWorkingPlaneN
( VAR outCenterPtX :REAL; VAR outCenterPtY :REAL; VAR outCenterPtZ :REAL; VAR outNormalX :REAL; VAR outNormalY :REAL; VAR outNormalZ :REAL; VAR outUVecX :REAL; VAR outUVecY :REAL; VAR outUVecZ :REAL ) ; Python:
return (outCenterPt, outNormal, outUVec)
def vs.GetWorkingPlaneN(): Description:
Get the active working plane.Parameters:
outCenterPt Output. The working plane center. outNormal Output. The working plane normal. outUVec Output. The U Vector of the plane.
| ImportImageFile | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION ImportImageFile
( filePath :DYNARRAY[] of CHAR; importPtX :REAL; importPtY :REAL ) :HANDLE ; Python:
return HANDLE
def vs.ImportImageFile(filePath, importPt): Description:
Import the specified image file as an Image object in Vectorworks.Parameters:
filePath Full path to the image file. importPt Location on which the file should be imported.
| ImportImageFileN | Utility Vectorworks 2015 |
VectorScript Declaration:
FUNCTION ImportImageFileN
( filePath :DYNARRAY[] of CHAR; importPtX :REAL; importPtY :REAL; mode :INTEGER ) :HANDLE ; Python:
return HANDLE
def vs.ImportImageFileN(filePath, importPt, mode): Description:
Import the specified image file as an Image object in Vectorworks.This funciton allow controlling the options when importing the image.Parameters:
filePath Import file path. importPt The import location. mode Import mode: 0 - import using import option dialog; 1 - import using the last options. if the call was never made with option dialog, then the firt time it will show the options dialog. Result:
Return the imported image handle, or NIL if the import failed.See Also:
ImportImageFile
| IsCoPlanar | Utility Vectorworks 2011 |
VectorScript Declaration:
FUNCTION IsCoPlanar
( refID1 :LONGINT; refID2 :LONGINT ) :BOOLEAN ; Python:
return BOOLEAN
def vs.IsCoPlanar(refID1, refID2): Description:
Returns true if two planes are coplanar.Parameters:
refID1 Reference ID of the first plane. refID2 Reference ID of the second plane.
| IsPerpPlane | Utility Vectorworks 2011 |
VectorScript Declaration:
FUNCTION IsPerpPlane
( refID1 :LONGINT; refID2 :LONGINT ) :BOOLEAN ; Python:
return BOOLEAN
def vs.IsPerpPlane(refID1, refID2): Description:
Returns true if two planes are perpendicular.Parameters:
refID1 Reference ID of the first plane. refID2 Reference ID of the second plane.
| Message | Utility MiniCAD |
VectorScript Declaration:
PROCEDURE Message
( z :ANY ) ; Python:
return None
def vs.Message(z): 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 VectorWorks8.0 |
VectorScript Declaration:
PROCEDURE NameUndoEvent
( eventName:STRING ) ; Python:
return None
def vs.NameUndoEvent(eventName): 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.
| OpenScriptResPal | Utility Vectorworks 2014 |
VectorScript Declaration:
PROCEDURE OpenScriptResPal
( paletteName :STRING; open :BOOLEAN ) ; Python:
return None
def vs.OpenScriptResPal(paletteName, open): Description:
Open or close a script resource palette.Parameters:
paletteName The script resource palette. open Pass in TRUE for the palette to be opened. See Also:
CreateScriptResource GetScriptResource SetScriptResource
| OpenURL | Utility VectorWorks10.0 |
VectorScript Declaration:
FUNCTION OpenURL
( URLname:DYNARRAY[] of CHAR ) :BOOLEAN ; Python:
return BOOLEAN
def vs.OpenURL(URLname): Description:
Opens a web page or file using the default browser or appropriate application (e.g. Adobe Acrobat). Returns a boolean indicating the success of the operation.
The URL (Uniform Resource Locator) is a pointer to a resource on the World Wide Web. It specifies both the protocol and location of the document to open. For files on the local computer, the URL should begin with file:// protocol specifier. For web pages, the URL should begin with http://. The URL should use forward slashes / to separate parts of the path.
There are some platform differences to be aware of. Windows will accept either \ or / as the path separators. MacOS X requires that file:// URLs begin with /Volumes/ before the drive name. Also, currently the MacOS X implementation of OpenURL does not accept spaces in the URL. Spaces should be replaced with the escape code %20 before calling this function.
Note: The function GetFolderPath returns a string with separators specific for the platform it is running on (: on Mac and \ on Windows). If your script calls this function to assemble a local file:// URL then you will have to replace the : separators with / characters.
Parameters:
URLname The Uniform Resource Locator for the web page or file to open. Example:
{ Open a webpage. } status := OpenURL('http://www.nemetschek.net'); { Open an HTML file on MacOS X. } status := OpenURL('file:///Volumes/MyMacXHD/Documents/My%20Files/Test.html'); { Open a PDF file in Acrobat on MacOS X. } status := OpenURL('file:///Volumes/MyMacXHD/Documents/My%20Files/VSLG11.pdf'); { Open a PDF file in Acrobat on MacOS 9. } status := OpenURL('file:///MyMac9HD/My Files/VSLG11.pdf'); { Open a PDF file in Acrobat on Windows. } status := OpenURL('file:///C:/My Files/VSLG11.pdf';
| PickObject | Utility MiniCAD |
VectorScript Declaration:
FUNCTION PickObject
( pX :REAL; pY :REAL ) :HANDLE ; Python:
return HANDLE
def vs.PickObject(p): 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:
FUNCTION UserObjectPick :HANDLE; VAR x, y :REAL; BEGIN GetPt(x, y); UserObjectPick := PickObject(x, y); END;See Also:
GetPickObjectInfo ForEachObjectAtPoint
| PlanarPtTo3DModelPt | Utility Vectorworks 2011 |
VectorScript Declaration:
FUNCTION PlanarPtTo3DModelPt
( refID :LONGINT; pt2DX :REAL; pt2DY :REAL; VAR outPt3DX :REAL; VAR outPt3DY :REAL; VAR outPt3DZ :REAL ) :BOOLEAN ; Python:
return (BOOLEAN, outPt3D)
def vs.PlanarPtTo3DModelPt(refID, pt2D): Description:
Transform a 2D point on the specified plane into a 3D point.Parameters:
refID Reference ID of the plane. pt2D The 2D point on the specified plane. outPt3D Output. The resulted 3D point.
| PlanarPtToScreenPlanePt | Utility Vectorworks 2011 |
VectorScript Declaration:
FUNCTION PlanarPtToScreenPlanePt
( refID :LONGINT; pt2DX :REAL; pt2DY :REAL; VAR outPtX :REAL; VAR outPtY :REAL ) :BOOLEAN ; Python:
return (BOOLEAN, outPt)
def vs.PlanarPtToScreenPlanePt(refID, pt2D): Description:
Projects a 2D point from the specified plane onto the screen plane.Parameters:
refID Reference ID of the plane. pt2D Input the 2D point on the plane. outPt Output the 2D point on the screen.
| PrepRelatedObjectForChange | Utility VectorWorks12.5 |
VectorScript Declaration:
PROCEDURE PrepRelatedObjectForChange
( objectAboutToBeChange:HANDLE ) ; Python:
return None
def vs.PrepRelatedObjectForChange(objectAboutToBeChange): Description:
Prepares some other related object for a change thats about to occur.Parameters:
objectAboutToBeChange The object to be prepared for a change
| ProgressDlgClose | Utility Vectorworks 2015 |
VectorScript Declaration:
PROCEDURE ProgressDlgClose
; Python:
return None
def vs.ProgressDlgClose(): Description:
Close the progress dialog opened with ProgressDlgOpen.
| ProgressDlgEnd | Utility Vectorworks 2015 |
VectorScript Declaration:
PROCEDURE ProgressDlgEnd
; Python:
return None
def vs.ProgressDlgEnd(): Description:
End a progress context started with ProgressDlgStart. This will make the progress jump to the percentage declared when started.
| ProgressDlgHasCancel | Utility Vectorworks 2015 |
VectorScript Declaration:
FUNCTION ProgressDlgHasCancel
:BOOLEAN ; Python:
return BOOLEAN
def vs.ProgressDlgHasCancel(): Description:
Determine if the dialog has been canceled. The dialog must have cancelation enabled when created.
| ProgressDlgOpen | Utility Vectorworks 2015 |
VectorScript Declaration:
PROCEDURE ProgressDlgOpen
( title :STRING; canCancel :BOOLEAN ) ; Python:
return None
def vs.ProgressDlgOpen(title, canCancel): Description:
Show a progress dialog that doesn't interrupt the script. ProgressDlgClose must be used to close the dialog.
| ProgressDlgOpenDelay | Utility Vectorworks 2015 |
VectorScript Declaration:
PROCEDURE ProgressDlgOpenDelay
( title :STRING; canCancel :BOOLEAN; delaySec :INTEGER ) ; Python:
return None
def vs.ProgressDlgOpenDelay(title, canCancel, delaySec): Description:
Show a progress dialog that doesn't interrupt the script. The dialog will be displaed after specified dealy time (in miliseconds). ProgressDlgClose must be used to close the dialog.
| ProgressDlgSetBotMsg | Utility Vectorworks 2015 |
VectorScript Declaration:
PROCEDURE ProgressDlgSetBotMsg
( message:STRING ) ; Python:
return None
def vs.ProgressDlgSetBotMsg(message): Description:
Set bottom message of a progress dialog.
| ProgressDlgSetMeter | Utility Vectorworks 2015 |
VectorScript Declaration:
PROCEDURE ProgressDlgSetMeter
( message:STRING ) ; Python:
return None
def vs.ProgressDlgSetMeter(message): Description:
Set progress meter message of a progress dialog.
| ProgressDlgSetTopMsg | Utility Vectorworks 2015 |
VectorScript Declaration:
PROCEDURE ProgressDlgSetTopMsg
( message:STRING ) ; Python:
return None
def vs.ProgressDlgSetTopMsg(message): Description:
Set top message of a progress dialog.
| ProgressDlgStart | Utility Vectorworks 2015 |
VectorScript Declaration:
PROCEDURE ProgressDlgStart
( Percentage :REAL; LoopCount :LONGINT ) ; Python:
return None
def vs.ProgressDlgStart(Percentage, LoopCount): Description:
Start a progress context. This defines progress percentage and loop count for ProgressDlgYeld calls. LoopCount is fit in the Percentage of the progress
| ProgressDlgYeld | Utility Vectorworks 2015 |
VectorScript Declaration:
PROCEDURE ProgressDlgYeld
( count:LONGINT ) ; Python:
return None
def vs.ProgressDlgYeld(count): Description:
Increases the progress. This must be called between ProgressDlgStart and ProgressDlgEnd and defines the LoopCount index.
| PythonBeginContext | Utility Vectorworks 2014 |
VectorScript Declaration:
PROCEDURE PythonBeginContext
; Python:
return None
def vs.PythonBeginContext(): Description:
This function creates a context in which PythonExecute scripts are run.
This function consecutive python scripts to be executed inside the same python environment.See Also:
PythonExecute PythonEndContext
| PythonEndContext | Utility Vectorworks 2014 |
VectorScript Declaration:
PROCEDURE PythonEndContext
; Python:
return None
def vs.PythonEndContext(): Description:
Closes python context previously opened with PythonBeginContext.See Also:
PythonBeginContext
| PythonExecute | Utility Vectorworks 2014 |
VectorScript Declaration:
PROCEDURE PythonExecute
( script:DYNARRAY[] of CHAR ) ; Python:
return None
def vs.PythonExecute(script): Description:
Execute the given python script.
You can use 'include' in python to run additional code in python files. However, before you execute the script make sure the python file are foundable through the PythonGetSearchPath. Use PythonSetSearchPath to change it.
Scripts executed via this function should not contain User Interactive functions like GetPt for example.Parameters:
script The script to be executed. See Also:
PythonGetSearchPath PythonSetSearchPath
| PythonGetSearchPath | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION PythonGetSearchPath
:DYNARRAY[] of CHAR ; Python:
return DYNARRAY of CHAR
def vs.PythonGetSearchPath(): Description:
Return the search path for python files.Result:
The result is a string of semicolon delimited paths. The path it similar to the 'Open' function path parameter.See Also:
PythonSetSearchPath PythonExecute
| PythonSetSearchPath | Utility Vectorworks 2014 |
VectorScript Declaration:
PROCEDURE PythonSetSearchPath
( pathList:DYNARRAY[] of CHAR ) ; Python:
return None
def vs.PythonSetSearchPath(pathList): Description:
Set the search path for python files.Parameters:
pathList A string of semicolon delimited paths. The path it similar to the 'Open' function path parameter. See Also:
PythonGetSearchPath PythonExecute
| ReDraw | Utility MiniCAD |
VectorScript Declaration:
PROCEDURE ReDraw
; Python:
return None
def vs.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 MiniCAD |
VectorScript Declaration:
PROCEDURE ReDrawAll
; Python:
return None
def vs.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.
| RedrawSelection | Utility Vectorworks 2010 |
VectorScript Declaration:
PROCEDURE RedrawSelection
; Python:
return None
def vs.RedrawSelection(): Description:
This will update selection indication without redrawing the drawing.
| ResetObject | Utility VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE ResetObject
( objectHandle:HANDLE ) ; Python:
return None
def vs.ResetObject(objectHandle): Description:
Update the specified object using the current settings and parameter values. This will reset the bounding box of the object. If the object is in a wall, then the wall is reset also.
An object of any type may be passed to this function to have its boundary reset. The following object types will be reset in a way that is appropriate for each type: Plug-in Object, Symbol Definition, Wall, Roof Container, Bitmap, Picture, Dimension, Extrude, Multiple Extrude, Sweep, Polygon, Polyline, Worksheet.Parameters:
objectHandle Handle to the object to be reset.
| RGBToColorIndex | Utility MiniCAD6.0 |
VectorScript Declaration:
PROCEDURE RGBToColorIndex
( red :LONGINT; green :LONGINT; blue :LONGINT; VAR color :INTEGER ) ; Python:
return color
def vs.RGBToColorIndex(red, green, blue): 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. RGB values are in the range of 0~65535.
A color table listing with associated index values can be found in the Appendix.
Parameters:
red RGB color component value. green RGB color component value. blue RGB color component value. color Color index. Example:
PROCEDURE Example; VAR red, green, blue :LONGINT; colorIndex :INTEGER; BEGIN GetPenFore(FSActLayer, red, green, blue); RGBToColorIndex(red, green, blue, colorIndex); Message(colorIndex); END; RUN(Example);
| RGBToColorIndexN | Utility Vectorworks 2010 |
VectorScript Declaration:
PROCEDURE RGBToColorIndexN
( red :LONGINT; green :LONGINT; blue :LONGINT; VAR color :INTEGER; ignoreBlackBackground :BOOLEAN ) ; Python:
return color
def vs.RGBToColorIndexN(red, green, blue, ignoreBlackBackground): Description:
Procedure RGBToColorIndexN converts the Vectorworks palette colors from its' red, green, and blue component values to the Vectorworks color index. Parameters red, green, and blue return the color components of the swatch, and parameter color is the Vectorworks color index. RGB values are in the range of 0~65535. Parameter ignoreBlackBackground specifies whether the black background preference should be ignored. If set to TRUE, black and white indexes will not be inverted in black background.
A color table listing with associated index values can be found in the Appendix.Parameters:
red RGB color component value. green RGB color component value. blue RGB color component value. color Color index. ignoreBlackBackground Ignore black background preference setting or not. Example:
PROCEDURE Example; VAR red, green, blue :LONGINT; colorIndex :INTEGER; BEGIN GetPenFore(FSActLayer, red, green, blue); RGBToColorIndexN(red, green, blue, colorIndex, TRUE); Message(colorIndex); END; RUN(Example)
| Rpstr_GetValueBool | Utility Vectorworks 2012 |
VectorScript Declaration:
FUNCTION Rpstr_GetValueBool
( name :STRING; defaultValue :BOOLEAN ) :BOOLEAN ; Python:
return BOOLEAN
def vs.Rpstr_GetValueBool(name, defaultValue): Description:
Get a boolean value from the VectorScript value repository.Parameters:
name The name of the value. defaultValue Default value if the name does not exist in the VectorScript value repository. See Also:
Rpstr_RemoveValues Rpstr_RemoveValue Rpstr_GetValueBool Rpstr_SetValueBool Rpstr_GetValueInt Rpstr_SetValueInt Rpstr_GetValueReal Rpstr_SetValueReal Rpstr_GetValueStr Rpstr_SetValueStr
| Rpstr_GetValueInt | Utility Vectorworks 2012 |
VectorScript Declaration:
FUNCTION Rpstr_GetValueInt
( name :STRING; defaultValue :INTEGER ) :INTEGER ; Python:
return INTEGER
def vs.Rpstr_GetValueInt(name, defaultValue): Description:
Get an integer value from the VectorScript value repository.Parameters:
name The name of the value. defaultValue Default value if the name does not exist in the VectorScript value repository. See Also:
Rpstr_RemoveValues Rpstr_RemoveValue Rpstr_GetValueBool Rpstr_SetValueBool Rpstr_GetValueInt Rpstr_SetValueInt Rpstr_GetValueReal Rpstr_SetValueReal Rpstr_GetValueStr Rpstr_SetValueStr
| Rpstr_GetValueReal | Utility Vectorworks 2012 |
VectorScript Declaration:
FUNCTION Rpstr_GetValueReal
( name :STRING; defaultValue :REAL ) :REAL ; Python:
return REAL
def vs.Rpstr_GetValueReal(name, defaultValue): Description:
Get a real value from the VectorScript value repository.Parameters:
name The name of the value. defaultValue Default value if the name does not exist in the VectorScript value repository. See Also:
Rpstr_RemoveValues Rpstr_RemoveValue Rpstr_GetValueBool Rpstr_SetValueBool Rpstr_GetValueInt Rpstr_SetValueInt Rpstr_GetValueReal Rpstr_SetValueReal Rpstr_GetValueStr Rpstr_SetValueStr
| Rpstr_GetValueStr | Utility Vectorworks 2012 |
VectorScript Declaration:
FUNCTION Rpstr_GetValueStr
( name :STRING; defaultValue :DYNARRAY[] of CHAR ) :DYNARRAY[] of CHAR ; Python:
return DYNARRAY of CHAR
def vs.Rpstr_GetValueStr(name, defaultValue): Description:
Get a string value from the VectorScript value repository.Parameters:
name The name of the value. defaultValue Default value if the name does not exist in the VectorScript value repository. See Also:
Rpstr_RemoveValues Rpstr_RemoveValue Rpstr_GetValueBool Rpstr_SetValueBool Rpstr_GetValueInt Rpstr_SetValueInt Rpstr_GetValueReal Rpstr_SetValueReal Rpstr_GetValueStr Rpstr_SetValueStr
| Rpstr_RemoveValue | Utility Vectorworks 2012 |
VectorScript Declaration:
FUNCTION Rpstr_RemoveValue
( name:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.Rpstr_RemoveValue(name): Description:
Removes a named value from the VectorScript value repository.Parameters:
name The name of the value. Result:
Return true if the value was found and removed.See Also:
Rpstr_RemoveValues Rpstr_RemoveValue Rpstr_GetValueBool Rpstr_SetValueBool Rpstr_GetValueInt Rpstr_SetValueInt Rpstr_GetValueReal Rpstr_SetValueReal Rpstr_GetValueStr Rpstr_SetValueStr
| Rpstr_RemoveValues | Utility Vectorworks 2012 |
VectorScript Declaration:
PROCEDURE Rpstr_RemoveValues
; Python:
return None
def vs.Rpstr_RemoveValues(): Description:
Removes all values from the VectorScript value repository.See Also:
Rpstr_RemoveValues Rpstr_RemoveValue Rpstr_GetValueBool Rpstr_SetValueBool Rpstr_GetValueInt Rpstr_SetValueInt Rpstr_GetValueReal Rpstr_SetValueReal Rpstr_GetValueStr Rpstr_SetValueStr
| Rpstr_SetValueBool | Utility Vectorworks 2012 |
VectorScript Declaration:
PROCEDURE Rpstr_SetValueBool
( name :STRING; value :BOOLEAN ) ; Python:
return None
def vs.Rpstr_SetValueBool(name, value): Description:
Set a boolean value from the VectorScript value repository.Parameters:
name The name of the value. value Set a value associated with the name in the VectorScript value repository. See Also:
Rpstr_RemoveValues Rpstr_RemoveValue Rpstr_GetValueBool Rpstr_SetValueBool Rpstr_GetValueInt Rpstr_SetValueInt Rpstr_GetValueReal Rpstr_SetValueReal Rpstr_GetValueStr Rpstr_SetValueStr
| Rpstr_SetValueInt | Utility Vectorworks 2012 |
VectorScript Declaration:
PROCEDURE Rpstr_SetValueInt
( name :STRING; value :INTEGER ) ; Python:
return None
def vs.Rpstr_SetValueInt(name, value): Description:
Set an integer value from the VectorScript value repository.Parameters:
name The name of the value. value Set a value associated with the name in the VectorScript value repository. See Also:
Rpstr_RemoveValues Rpstr_RemoveValue Rpstr_GetValueBool Rpstr_SetValueBool Rpstr_GetValueInt Rpstr_SetValueInt Rpstr_GetValueReal Rpstr_SetValueReal Rpstr_GetValueStr Rpstr_SetValueStr
| Rpstr_SetValueReal | Utility Vectorworks 2012 |
VectorScript Declaration:
PROCEDURE Rpstr_SetValueReal
( name :STRING; value :REAL ) ; Python:
return None
def vs.Rpstr_SetValueReal(name, value): Description:
Set a real value from the VectorScript value repository.Parameters:
name The name of the value. value Set a value associated with the name in the VectorScript value repository. See Also:
Rpstr_RemoveValues Rpstr_RemoveValue Rpstr_GetValueBool Rpstr_SetValueBool Rpstr_GetValueInt Rpstr_SetValueInt Rpstr_GetValueReal Rpstr_SetValueReal Rpstr_GetValueStr Rpstr_SetValueStr
| Rpstr_SetValueStr | Utility Vectorworks 2012 |
VectorScript Declaration:
PROCEDURE Rpstr_SetValueStr
( name :STRING; value :DYNARRAY[] of CHAR ) ; Python:
return None
def vs.Rpstr_SetValueStr(name, value): Description:
Set a string value from the VectorScript value repository.Parameters:
name The name of the value. value Set a value associated with the name in the VectorScript value repository. See Also:
Rpstr_RemoveValues Rpstr_RemoveValue Rpstr_GetValueBool Rpstr_SetValueBool Rpstr_GetValueInt Rpstr_SetValueInt Rpstr_GetValueReal Rpstr_SetValueReal Rpstr_GetValueStr Rpstr_SetValueStr
| ScreenPlanePtToPlanarPt | Utility Vectorworks 2011 |
VectorScript Declaration:
PROCEDURE ScreenPlanePtToPlanarPt
( refID :LONGINT; pt2DX :REAL; pt2DY :REAL; VAR outPtX :REAL; VAR outPtY :REAL ) ; Python:
return outPt
def vs.ScreenPlanePtToPlanarPt(refID, pt2D): Description:
Projects a 2D point from the screen plane onto the specified plane.Parameters:
refID Reference ID of the plane. pt2D Input the 2D point on the screen. outPt Output the 2D point on the plane.
| SetCallBackInval | Utility Vectorworks 2014 |
VectorScript Declaration:
PROCEDURE SetCallBackInval
( turnInvalOn:BOOLEAN ) ; Python:
return None
def vs.SetCallBackInval(turnInvalOn): Description:
Sets whether or not callbacks should be invalidating portions of the screen that are being changed. This should be used if you need to create temporary objects for calculation purposes and do not want the screen to be redrawn as a result
| SetCurrentObject | Utility MiniCAD4.0 |
VectorScript Declaration:
PROCEDURE SetCurrentObject
( h:HANDLE ) ; Python:
return None
def vs.SetCurrentObject(h): 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.
| SetDrawingRect | Utility VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE SetDrawingRect
( paperWidth :REAL; paperHeight :REAL ) ; Python:
return None
def vs.SetDrawingRect(paperWidth, paperHeight): Description:
Sets the size of the drawing rectangle.Parameters:
paperWidth The width of the drawing rectangle paperHeight The height of the drawing rectangle
| SetMaximumUndoEvents | Utility VectorWorks8.0 |
VectorScript Declaration:
PROCEDURE SetMaximumUndoEvents
( events:INTEGER ) ; Python:
return None
def vs.SetMaximumUndoEvents(events): 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.
| SetModeString | Utility Vectorworks 2014 |
VectorScript Declaration:
PROCEDURE SetModeString
( messageStr:STRING ) ; Python:
return None
def vs.SetModeString(messageStr): Description:
Sets the mode string to the given parameter
| SetPaletteVisibility | Utility VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE SetPaletteVisibility
( paletteName :STRING; vis :BOOLEAN ) ; Python:
return None
def vs.SetPaletteVisibility(paletteName, vis): Description:
Sets the visibility state of a palette.Parameters:
paletteName Name of the palette vis True if the palette should be visible, false otherwise See Also:
GetPaletteVisibility
| SetSavedSetting | Utility VectorWorks12.0 |
VectorScript Declaration:
PROCEDURE SetSavedSetting
( category :STRING; setting :STRING; value :STRING ) ; Python:
return None
def vs.SetSavedSetting(category, setting, value): Description:
Writes a value to the saved settings file. This can be used to remember various user settings between running sessions of Vectorworks. For example, a script may want to remember a dialog's position or a font settings. The saved settings should not be used for critical information, but rather for convenience settings.
| SetToolByIndex | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION SetToolByIndex
( toolIndex:INTEGER ) :BOOLEAN ; Python:
return BOOLEAN
def vs.SetToolByIndex(toolIndex): Description:
Similar to SetTool. Takes the internal ID of a tool.
| SetToolByName | Utility Vectorworks 2014 |
VectorScript Declaration:
FUNCTION SetToolByName
( toolName:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.SetToolByName(toolName): Description:
Similar to SetTool, but takes name rather than ID. Supports plug-in tools (but not yet internal tools).
| SetWorkingPlane | Utility VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE SetWorkingPlane
( x :REAL; y :REAL; z :REAL; xRotation :REAL; yRotation :REAL; zRotation :REAL ) ; Python:
return None
def vs.SetWorkingPlane(x, y, z, xRotation, yRotation, zRotation): Description:
Sets the x, y, and z offset of the working plane as well as the x-, y-, and z-plane rotational values.Parameters:
x X-coordinate of the working plane y Y-coordinate of the working plane z Z-coordinate of the working plane xRotation X-coordinate of the rotation yRotation Y-coordinate of the rotation zRotation Z-coordinate of the rotation See Also:
GetWorkingPlane
| SetWorkingPlaneN | Utility Vectorworks 2011 |
VectorScript Declaration:
PROCEDURE SetWorkingPlaneN
( centerPtX :REAL; centerPtY :REAL; centerPtZ :REAL; normalX :REAL; normalY :REAL; normalZ :REAL; uVecX :REAL; uVecY :REAL; uVecZ :REAL ) ; Python:
return None
def vs.SetWorkingPlaneN(centerPt, normal, uVec): Description:
Set the active working plane.Parameters:
centerPt Location of the working plane. normal Normal vector of the working plane. uVec The U Vector of the plane.
| SortArray | Utility VectorWorks9.0 |
VectorScript Declaration:
PROCEDURE SortArray
( VAR arraytosort :ARRAY; numtosort :INTEGER; fieldnumber :INTEGER ) ; Python:
return arraytosort
def vs.SortArray(numtosort, fieldnumber): Description:
Sorts a 1-dimension array into ascending order. If the array contains handles to records, the array can be sorted by the specified field number index. If the array is an array of structures, the fieldnumber argument denotes the element in the structure on which to sort.
| SysBeep | Utility MiniCAD |
VectorScript Declaration:
PROCEDURE SysBeep
; Python:
return None
def vs.SysBeep(): Description:
Procedure SysBeep uses the current system prompt sound to alert the user.
| UndoOff | Utility VectorWorks8.0 |
VectorScript Declaration:
PROCEDURE UndoOff
; Python:
return None
def vs.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.
| ValidAngStr | Utility MiniCAD |
VectorScript Declaration:
FUNCTION ValidAngStr
( str :STRING; VAR value :REAL ) :BOOLEAN ; Python:
return (BOOLEAN, value)
def vs.ValidAngStr(str): Description:
Function ValidAngStr returns TRUE if the specified value can be converted into a numeric angle value. If TRUE, the value (in decimal degrees) of the string is returned.
Parameters:
str String value to be checked for angle validity. value Returns numeric angle value converted from input string. Result:
Returns TRUE if the specified string can be converted into a angle value.Example:
PROCEDURE Example; VAR str :STRING; value :REAL; BEGIN str := StrDialog('Enter the angle:', 'N10E'); IF ValidAngStr(str, value) THEN Message(value); END; RUN(Example);
| ValidNumStr | Utility MiniCAD |
VectorScript Declaration:
FUNCTION ValidNumStr
( str :STRING; VAR value :REAL ) :BOOLEAN ; Python:
return (BOOLEAN, value)
def vs.ValidNumStr(str): Description:
Function ValidNumStr returns TRUE if the specified string can be converted into a numeric value. If TRUE, the numeric value is returned.Parameters:
str String value to be checked for numeric validity. value Numeric value converted from input string. Result:
Returns TRUE if specified string can be converted into a numeric value.Example:
CASE Item OF {// OK Button //} 1:BEGIN IF ValidNumStr(GetField(4),value) THEN BEGIN Done:=TRUE; replaceValue:= GetField(6); IF ItemSel(9) THEN textMode:=2; IF ItemSel(10) THEN textMode:=4; IF ItemSel(11) THEN textMode:=8; IF ItemSel(12) THEN layerMode:=16; IF ItemSel(13) THEN layerMode:=32; IF ItemSel(14) THEN caseMode:=1; END ELSE SysBeep; END;
| VerifyLibraryRoutine | Utility VectorWorks9.0 |
VectorScript Declaration:
FUNCTION VerifyLibraryRoutine
( routineName:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.VerifyLibraryRoutine(routineName): Description:
Verifies that a procedure or function call located in a VectorScript extension is registered and available for use in scripts.
Call this function prior to using any call located in a VectorScript extension to ensure successful use of the call in a script.
(A VectorScript extension is also known as an SDK Plug-in Library. It is a plug-in that is developed using the Vectorworks SDK and the C++ language. When installed in the Plug-ins folder it provides functions that may be called from VectorScript. The VerifyLibraryRoutine function allows the script to determine if the function is available.)Parameters:
routineName Name of function call to be verified. Result:
Returns TRUE if the call is available, otherwise returns FALSE.
| Wait | Utility MiniCAD |
VectorScript Declaration:
PROCEDURE Wait
( seconds:INTEGER ) ; Python:
return None
def vs.Wait(seconds): 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}