| ActLayer | Layers MiniCAD |
VectorScript Declaration:
FUNCTION ActLayer
:HANDLE ; Python:
return HANDLE
def vs.ActLayer(): Description:
Function ActLayer returns a handle to the currently active layer in a document.See Also:
ActiveClass ActSymDef GetLName
| AddLevelFromTemplate | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION AddLevelFromTemplate
( storyHandle :HANDLE; index :INTEGER ) :BOOLEAN ; Python:
return BOOLEAN
def vs.AddLevelFromTemplate(storyHandle, index): Description:
Adds a new Story Layer to the Story pointed to by 'storyHandle', using the Story Level Template at 'index' as a template. The story must not already contain a Story Level with the same level type or elevation as the template. If the template has a layer name set, a new layer will be created and associated with the new Story Level.Parameters:
storyHandle The handle of the Story to add the new Story Level to. index The index of the Story Level Template to use when creating the Story Level. Result:
Whether the Story Level was successfully created.Example:
VAR storyHandle : HANDLE success:BOOLEAN BEGIN storyHandle := CreateStory('Floor 1', '-1'); success := AddStoryLevelFromTemplate(storyHandle,1);See Also:
CreateStory AddStoryLevel RemoveStoryLevel
| AddStoryLevel | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION AddStoryLevel
( storyHandle :HANDLE; levelType :STRING; elevation :REAL; layerName :STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.AddStoryLevel(storyHandle, levelType, elevation, layerName): Description:
Adds a new Story Layer to the Story pointed to by 'storyHandle'. There must not be another story level in this story that matches 'levelType' or 'elevation', or the function will fail. If the layer 'layerName' already exists, it will be associated with the new Story Level.Parameters:
storyHandle The handle of the story that the new level should be added to. levelType The level type of the new Story Level. This cannot be blank. elevation The elevation of the new Story Level in the story. layerName The name of the layer to associate with the new Story Level. This is optional. Result:
Whether the new Story Level was created and added.Example:
VAR storyHandle : HANDLE success:BOOLEAN BEGIN storyHandle := CreateStory('Floor 1', '-1'); success := AddStoryLevel(storyHandle, 'Finish Floor', 0, 'Floor');See Also:
CreateStory RemoveStoryLevel
| AssociateLayerWithStory | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION AssociateLayerWithStory
( layer :HANDLE; story :HANDLE ) :BOOLEAN ; Python:
return BOOLEAN
def vs.AssociateLayerWithStory(layer, story): Description:
Associates a Layer with a Story. When a Layer is associated with a Story, the Layer's elevation is displayed relative to the Story elevation. If the elevation of the associated Story is changed, the elevation of the Layer changes with it.Parameters:
layer The Layer to associate. story The Story to associate. Result:
Whether the Layer was successfully associated with the Story. This will fail if there is already another Layer associated with the Story that has the same Layer Level Type as the Layer passed in.Example:
VAR success:BOOLEAN; story:HANDLE; layer:HANDLE; BEGIN story := GetObject('4th Floor'); layer := GetObject('Plan 4'); success := AssociateLayerWithStory(layer, story);See Also:
GetNumStories GetStoryOfLayer CreateStory
| CopyMode | Layers MiniCAD |
VectorScript Declaration:
PROCEDURE CopyMode
( mode:INTEGER ) ; Python:
return None
def vs.CopyMode(mode): Description:
Procedure CopyMode sets the transfer mode for the active design layer. If a sheet layer is active, the procedure has no effect.
Transfer Modes
Transfer Mode Index Value Copy 8 OR 9 XOR 10 BIC 11 Inverse Copy 12 Inverse OR 13 Inverse XOR 14 Inverse BIC 15
The design layer will only be imaged with the transfer mode on systems which support it, like Windows. Setting the transfer mode to a mode other than Copy (i.e. 8, Paint mode), when the current layer transparency percentage is 0, will also automatically change the layer transparency percentage to 50. Similarly, setting the transfer mode to Copy, when the current layer transparency percentage is greater than 0, will also automatically change the layer transparency percentage to 0. This is to approximately preserve the appearance of the layer on systems that don't support transfer modes, like Quartz on the Mac.
Parameters:
mode Mode index value. See Also:
SetLayerTransparency
| CreateLayer | Layers VectorWorks10.5 |
VectorScript Declaration:
FUNCTION CreateLayer
( layerName :STRING; layerType :INTEGER ) :HANDLE ; Python:
return HANDLE
def vs.CreateLayer(layerName, layerType): Description:
Creates a layer of the specified type.
layerType values:
Design = 1
Presentation = 2
| CreateLayerLevelType | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION CreateLayerLevelType
( name:STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.CreateLayerLevelType(name): Description:
Creates a Layer Level Type. A Layer can be assigned a Layer Level Type, which defines its location within a Story.Parameters:
name The name of the Layer Level Type to create. Result:
Whether a Layer Level Type was successfully created.See Also:
GetNumLayerLevelTypes GetLayerLevelType SetLayerLevelType
| CreateLevelTemplate | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION CreateLevelTemplate
( layerName :STRING; scaleFactor :REAL; levelType :STRING; elevation :REAL; wallHeight :REAL; VAR index :INTEGER ) :BOOLEAN ; Python:
return (BOOLEAN, index)
def vs.CreateLevelTemplate(layerName, scaleFactor, levelType, elevation, wallHeight): Description:
Creates a Story Level Template in the current file. Sets the index parameter to the index of the new template in the list of templates. Story Levels contain a level type, elevation, and optional layer to be used to bound objects on stories; Story Level Templates define a generic level that can be added to multiple stories.Parameters:
layerName The layer name for the new Story Level Template. This can be blank, meaning that layers will not be created for instances of the new Story Level Template. scaleFactor The scale factor for the (optional) layer associated with this Story Level Template. levelType The level type for the new Story Level Template. There may be multiple Story Level Templates with the same level type, as long as they have different elevations. elevation The elevation of the Story Level Template, relative to the height of the story in which the level is used. wallHeight The wall height for (optional) layers created when using this Story Level Template in a Story. If the layer name is empty, this parameter is unused. index After the function is called, this parameter contains the index of the new Story Level Template. Result:
Whether the Story Level Template was successfully created.Example:
VAR success:BOOLEAN; BEGIN success := CreateStoryLevelTemplate('Mod-Slab', 1, 'LT_Slab', 0, 6);See Also:
| CreateStory | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION CreateStory
( name :STRING; suffix :STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.CreateStory(name, suffix): Description:
Creates a Story. Stories are used to group layers and are shown on the Story pane of the Organization dialog.Parameters:
name The name of the Story to create. suffix The suffix to be used at the end of the name of a Layer assoiciated with the Story. Result:
Whether the Story was successfully created.Example:
VAR success:BOOLEAN BEGIN success := CreateStory('4th Floor', '4');See Also:
GetNumStories GetStoryOfLayer AssociateLayerWithStory
| CreateStoryLayerTemplate | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION CreateStoryLayerTemplate
( name :STRING; scaleFactor :REAL; layerLevelType :STRING; elevationOffset :REAL; defaultWallHeight :REAL; VAR index :INTEGER ) :BOOLEAN ; Python:
return (BOOLEAN, index)
def vs.CreateStoryLayerTemplate(name, scaleFactor, layerLevelType, elevationOffset, defaultWallHeight): Description:
Creates a Story Layer Template in the current file. Sets the index parameter to the index of the new template in the list of templates. Story Layer Templates are used to define what Layers are typically found in a Story. When a Story is created, the user has the option to automatically create the Layers defined by the Story Layer Templates.Parameters:
name The name of the Story Layer Template. scaleFactor The scale to be assinged to any Layers created from this template. layerLevelType The Layer Level Type to be assigned to any Layers created from this template. elevationOffset The offset of the elevation of any Layer created from this template from the elevation of its Story. defaultWallHeight The wall height to be assigned to any Layer created from this template. index The index of the new template in the list of templates. Result:
Whether a Story Layer Template is successfully created.Example:
VAR success:BOOLEAN; BEGIN success := CreateStoryLayerTemplate('Mod-Slab', 1, 'LT_Slab', 0, 6);See Also:
GetNumStoryLayerTemplates GetStoryLayerTemplateName DeleteStoryLayerTemplate
| DeleteLevelTemplate | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION DeleteLevelTemplate
( index:INTEGER ) :BOOLEAN ; Python:
return BOOLEAN
def vs.DeleteLevelTemplate(index): Description:
Deletes the nth Story Level Template from the current file. For example, if 3 is passed in, it will delete the 3rd Story Level Template in the file.Parameters:
index The index of the Story Level Template to be deleted. Result:
Whether the Story Level Template at 'index' was found and deleted successfully.Example:
VAR success:BOOLEAN; BEGIN success := DeleteStoryTemplate(3);See Also:
| DeleteStoryLayerTemplate | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION DeleteStoryLayerTemplate
( index:INTEGER ) :BOOLEAN ; Python:
return BOOLEAN
def vs.DeleteStoryLayerTemplate(index): Description:
Deletes the nth Story Layer Template from the current file. For example, if 3 is passed in, it will delete the 3rd Story Layer Template in the file.Parameters:
index Index of the Story Layer Template to delete. Result:
Whether a Story Layer Template with the indicated index existed in the file.Example:
VAR success:BOOLEAN; BEGIN success := DeleteStoryTemplate(3);See Also:
GetNumStoryLayerTemplates GetStoryLayerTemplateName CreateStoryLayerTemplate
| DisplayLayerScaleDialog | Layers VectorWorks12.0 |
VectorScript Declaration:
PROCEDURE DisplayLayerScaleDialog
; Python:
return None
def vs.DisplayLayerScaleDialog(): Description:
Brings up the Layer Scale dialog.
| FLayer | Layers MiniCAD |
VectorScript Declaration:
FUNCTION FLayer
:HANDLE ; Python:
return HANDLE
def vs.FLayer(): Description:
Function FLayer returns a handle to the first layer in a Vectorworks document.
| GetLayer | Layers MiniCAD |
VectorScript Declaration:
FUNCTION GetLayer
( h:HANDLE ) :HANDLE ; Python:
return HANDLE
def vs.GetLayer(h): Description:
Function GetLayer returns a handle to the layer of the referenced object.
Parameters:
h Handle to object. Example:
LayerHandle:=GetLayer(ObjHd);
| GetLayerByName | Layers VectorWorks8.5 |
VectorScript Declaration:
FUNCTION GetLayerByName
( layerName:STRING ) :HANDLE ; Python:
return HANDLE
def vs.GetLayerByName(layerName): Description:
Returns a handle to the specified layer.Parameters:
layerName Name of layer. Result:
Returns a HANDLE to the layer.
| GetLayerElevation | Layers VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE GetLayerElevation
( h :HANDLE; VAR baseElev :REAL; VAR thickness :REAL ) ; Python:
return (baseElev, thickness)
def vs.GetLayerElevation(h): Description:
Gets the elevation and thickness of the specified layer.Parameters:
h Handle to the layer baseElev Base elevation of the layer thickness Thickness of the layer Example:
PROCEDURE Example; VAR h :HANDLE; baseElev, thickness :REAL; BEGIN h := FLayer; WHILE h <> NIL DO BEGIN GetLayerElevation(h, baseElev, thickness); thickness := thickness / (25.4 / GetPrefReal(152)); AlrtDialog(Concat('layer name: ', GetLName(h), ', baseElev: ', baseElev, ', thickness: ', thickness)); h := NextLayer(h); END; END; RUN(Example);See Also:
SetLayerElevation
| GetLayerForStory | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetLayerForStory
( story :HANDLE; levelType :STRING ) :HANDLE ; Python:
return HANDLE
def vs.GetLayerForStory(story, levelType): Description:
Gets the layer with the story and layer level type specified.Parameters:
story The Story for which the will be looked up for level types. levelType The level type of the story, which associated layer will be returned. Result:
The Layer associated with the Story and layer level specified, which may be NULL.Example:
VAR layer:HANDLE; BEGIN layer:=GetLayerForStory(story);See Also:
GetStoryOfLayer GetNumStories CreateStory AssociateLayerWithStory
| GetLayerLevelType | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetLayerLevelType
( layer:HANDLE ) :STRING ; Python:
return STRING
def vs.GetLayerLevelType(layer): Description:
Returns the Layer Level Type of the Layer.Parameters:
layer The Layer whose Layer Level Type is desired. Result:
The Layer Level Type of the Layer.Example:
VAR layerLevelType:STRING; BEGIN layerLevelType := GetLayerLevelType(ActLayer);See Also:
SetLayerLevelType CreateLayerLevelType
| GetLayerOptions | Layers VectorWorks8.5 |
VectorScript Declaration:
FUNCTION GetLayerOptions
:INTEGER ; Python:
return INTEGER
def vs.GetLayerOptions(): Description:
Returns layer visibility setting for the active document.
Visibility Index Active Only 1 Gray Others 2 Gray/Snap Others 6 Show Others 3 Show/Snap Others 4 Show/Snap/Modify Others 5 Result:
Returns an INTEGER indicating the layer visibility status of the document.See Also:
SetLayerOptions
| GetLayerRenderMode | Layers VectorWorks10.0 |
VectorScript Declaration:
FUNCTION GetLayerRenderMode
( theLayer:HANDLE ) :INTEGER ; Python:
return INTEGER
def vs.GetLayerRenderMode(theLayer): Description:
Returns the render mode for the referenced layer.
Table - Render Modes
Render Mode Constant Wireframe 0 Unshaded Polygon 2 Shaded Polygon 3 Shaded Polygon No Lines 4 Final Shaded Polygon 5 Hidden Line 6 Dashed Hidden Line 7 OpenGL 11 Fast RenderWorks 12 Fast RenderWorks with Shadows 13 Final Quality Renderworks 14 Custom Renderworks 15
| GetLayerTransparency | Layers Vectorworks 2013 |
VectorScript Declaration:
FUNCTION GetLayerTransparency
:REAL ; Python:
return REAL
def vs.GetLayerTransparency(): Description:
Return the tranparency of the current layer.See Also:
SetLayerTransparency
| GetLevelElevation | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION GetLevelElevation
( storyHandle :HANDLE; levelType :STRING ) :REAL ; Python:
return REAL
def vs.GetLevelElevation(storyHandle, levelType): Description:
Gets the elevation of a Story Level, relative to its containing Story.Parameters:
storyHandle The handle of the Story containing the Story Level we would like to know the elevation of. levelType The level type of the Story Level that we would like to know the elevation of. Result:
The elevation of the requested Story Level.See Also:
CreateStory AddStoryLevel RemoveStoryLevel
| GetLevelTemplateInfo | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION GetLevelTemplateInfo
( index :INTEGER; VAR layerName :STRING; VAR scaleFactor :REAL; VAR levelType :STRING; VAR elevation :REAL; VAR wallHeight :REAL ) :BOOLEAN ; Python:
return (BOOLEAN, layerName, scaleFactor, levelType, elevation, wallHeight)
def vs.GetLevelTemplateInfo(index): Description:
Used to access the properties of the Story Level Template at 'index'. The name, scaleFactor, levelType, elevation, and wallHeight parameters of the requested Story Level Template will be returned in the appropriate parameters.Parameters:
index The index of the desired Story Level Template. layerName The layer name associated with the Story Level Template at 'index'. If this is empty, the corresponding Story Level Template does not use or create a layer. scaleFactor The scale of the layer associated with the Story Level Template at 'index'. If this layer name is blank, this parameter has no use. levelType The level type of the Story Level Template at 'index'. elevation The elevation of the Story Level Template at 'index'. wallHeight The wall height of the Story Level Template at 'index'. If the layer name is blank, this parameter has no meaning. Result:
Whether the Story Level Template at 'index' was found and valid.See Also:
| GetLevelTemplateName | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION GetLevelTemplateName
( index:INTEGER ) :STRING ; Python:
return STRING
def vs.GetLevelTemplateName(index): Description:
Returns the name of the nth Story Level Template in the file. For example, if 3 is passed in, it will return the name of the 3rd Story Level Template in the file.Parameters:
index The index of the Story Level Template whose name is to be returned. Result:
The name of the Story Level Template at 'index',Example:
VAR templateName:STRING; BEGIN templateName:=GetStoryLevelTemplateName(2);See Also:
| GetLevelTypeName | Layers Vectorworks 2013 |
VectorScript Declaration:
FUNCTION GetLevelTypeName
( index:INTEGER ) :STRING ; Python:
return STRING
def vs.GetLevelTypeName(index): Description:
Returns the name of the nth Level Type in the file. For example, if 3 is passed in, it will return the name of the 3rd Level Type in the file.Parameters:
index The index of the level type whose name is desired. Result:
The name of the indicated level type.Example:
VAR levelTypeName:STRING; BEGIN levelTypeName:=GetLayerLevelTypeName(2);See Also:
GetNumLayerLevelTypes SetLevelTypeName
| GetLName | Layers MiniCAD |
VectorScript Declaration:
FUNCTION GetLName
( h:HANDLE ) :STRING ; Python:
return STRING
def vs.GetLName(h): Description:
Function GetLName returns the name of the referenced layer.Parameters:
h Handle to layer.
| GetLScale | Layers MiniCAD |
VectorScript Declaration:
FUNCTION GetLScale
( h:HANDLE ) :REAL ; Python:
return REAL
def vs.GetLScale(h): Description:
Function GetLScale returns the scale of the referenced layer.
Parameters:
h Handle to layer.
| GetLVis | Layers MiniCAD |
VectorScript Declaration:
FUNCTION GetLVis
( h:HANDLE ) :INTEGER ; Python:
return INTEGER
def vs.GetLVis(h): Description:
Function GetLVis returns the visibility of the referenced layer.
Table - Layer Visibility
Visibility Index Value Normal 0 Grayed 2 Invisible -1
Parameters:
h Handle to layer. Example:
FUNCTION GetLayerVisibility(layerHandle :handle) :INTEGER; {Returns the effective visibility of a layer.} BEGIN GetLayerVisibility := -1; IF layerHandle = ActLayer THEN GetLayerVisibility := 0 ELSE {Active layers are always visible.} IF (GetObjectVariableInt(ActLayer, 154) = 1) & (GetObjectVariableInt(layerHandle, 154) = 1) THEN BEGIN {If it's not the active layer, then the only way that it can be visible is if the active layer is a design layer, and so is layerHandle, and the combination of layer options and the layer's visibility will result in a visible layer.} IF (GetLayerOptions = 2) & (GetLVis(layerHandle) = 2) THEN GetLayerVisibility := 2 ELSE IF (GetLayerOptions = 2) & (GetLVis(layerHandle) = 0) THEN GetLayerVisibility := 2 ELSE IF (GetLayerOptions > 2) & (GetLVis(layerHandle) = 2) THEN GetLayerVisibility := 2 ELSE IF (GetLayerOptions > 2) & (GetLVis(layerHandle) = 0) THEN GetLayerVisibility := 0; END; END; PROCEDURE Example; BEGIN Message(GetLVis(GetLayerByName('Layer-1'))); END; RUN(Example);
| GetNumLayerLevelTypes | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetNumLayerLevelTypes
:INTEGER ; Python:
return INTEGER
def vs.GetNumLayerLevelTypes(): Description:
Returns the number of layer level types in the file. A layer can be assigned a layer level type, which defines its location within a story.Result:
The number of layer level types in the file.See Also:
GetLayerLevelType SetLayerLevelType CreateLayerLevelType
| GetNumLevelTemplates | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION GetNumLevelTemplates
:INTEGER ; Python:
return INTEGER
def vs.GetNumLevelTemplates(): Description:
Returns the number of story level templates in the file. Story Levels contain a level type, elevation, and optional layer to be used to bound objects on stories; Story Level Templates define a generic level that can be added to multiple stories.Result:
The number of Story Level Templates in the document.See Also:
| GetNumStories | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetNumStories
:INTEGER ; Python:
return INTEGER
def vs.GetNumStories(): Description:
Returns the number of stories in the file. Stories are used to group layers and are shown on the Story pane of the Organization dialog.Result:
Returns the number of stories in the file.See Also:
CreateStory GetStoryOfLayer AssociateLayerWithStory
| GetNumStoryLayerTemplates | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetNumStoryLayerTemplates
:INTEGER ; Python:
return INTEGER
def vs.GetNumStoryLayerTemplates(): Description:
Returns the number of story layer templates in the file. Story Layer Templates are used to define what Layers are typically found in a Story. When a Story is created, the user has the option to automatically create the Layers defined by the Story Layer Templates.Result:
The number of Story Layer Templates in the file.See Also:
CreateStoryLayerTemplate
| GetSheetLayerUserOrigin | Layers VectorWorks10.5 |
VectorScript Declaration:
FUNCTION GetSheetLayerUserOrigin
( layerHandle :HANDLE; VAR xOrigin :REAL; VAR yOrigin :REAL ) :BOOLEAN ; Python:
return (BOOLEAN, xOrigin, yOrigin)
def vs.GetSheetLayerUserOrigin(layerHandle): Description:
Gets the user origin of the specified sheet layer.Parameters:
layerHandle Handle of the layer. xOrigin X component of the sheet layer user origin. yOrigin Y component of the sheet layer user origin.
| GetStoryAbove | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetStoryAbove
( story:HANDLE ) :HANDLE ; Python:
return HANDLE
def vs.GetStoryAbove(story): Description:
Returns the Story above the indicated Story. Returns NULL if there is none. If passed a NULL handle, returns the top-most Story in the current drawing.Parameters:
story The indicated Story for which the Story above it is desired. Result:
The Story above the indicated Story, or NULL if there is none. If a NULL handle is passed in, the topmost Story in the current drawing.Example:
VAR baseStory:HANDLE; storyAbove:HANDLE; BEGIN baseStory := GetStoryOfLayer(ActLayer); storyAbove := StoryAbove(baseStory);See Also:
GetStoryBelow GetNumStories GetStoryOfLayer
| GetStoryBelow | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetStoryBelow
( story:HANDLE ) :HANDLE ; Python:
return HANDLE
def vs.GetStoryBelow(story): Description:
Returns the Story below the indicated Story. Returns NULL if there is none. If passed a NULL handle, returns the bottom-most Story in the current drawing.Parameters:
story The indicated Story for which the Story below it is desired Result:
The Story below the indicated Story, or NULL if there is none. If a NULL handle is passed in, the bottom-most Story in the current drawing.Example:
VAR baseStory:HANDLE; storyBelow:HANDLE; BEGIN baseStory := GetStoryOfLayer(ActLayer); storyBelow := StoryBelow(baseStory);See Also:
GetStoryAbove GetNumStories GetStoryOfLayer
| GetStoryElevation | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetStoryElevation
( story:HANDLE ) :REAL ; Python:
return REAL
def vs.GetStoryElevation(story): Description:
Returns the elevaton of the indicated Story.Parameters:
story The Story whose elevation is desired. Result:
The elevation of the Story.See Also:
CreateStory SetStoryElevation
| GetStoryLayerTemplateName | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetStoryLayerTemplateName
( index:INTEGER ) :STRING ; Python:
return STRING
def vs.GetStoryLayerTemplateName(index): Description:
Returns the name of the nth Story Layer Template in the file. For example, if 3 is passed in, it will return the name of the 3rd Story Layer Template in the file.Parameters:
index The index of the Story Layer Template whose name is desired. Result:
The name of the nth Story Layer Template.Example:
VAR templateName:STRING; BEGIN templateName:=GetStoryLayerTemplateName(2);See Also:
GetNumStoryLayerTemplates CreateStoryLayerTemplate
| GetStoryOfLayer | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetStoryOfLayer
( layer:HANDLE ) :HANDLE ; Python:
return HANDLE
def vs.GetStoryOfLayer(layer): Description:
Returns the Story that the indicated Layer is associated with. Returns NULL if the Layer is not associated with a Story.Parameters:
layer The Layer for which the associated Story is returned. Result:
The Story associated with the Layer, which may be NULL.Example:
VAR story:HANDLE; BEGIN story:=GetStoryOfLayer(ActLayer);See Also:
GetLayerForStory GetNumStories CreateStory AssociateLayerWithStory
| GetStorySuffix | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION GetStorySuffix
( story:HANDLE ) :STRING ; Python:
return STRING
def vs.GetStorySuffix(story): Description:
Returns the suffix of the indicated Story.Parameters:
story The Story whose suffix is desired. Result:
The suffix of the indicated Story.See Also:
GetStoryElevation SetStorySuffix
| GetZVals | Layers MiniCAD5.0 |
VectorScript Declaration:
PROCEDURE GetZVals
( VAR zVal :REAL; VAR deltaZVal :REAL ) ; Python:
return (zVal, deltaZVal)
def vs.GetZVals(): Description:
Procedure GetZVals returns the Z (layer base elevation) and delta Z (layer thickness) values for the active layer.Parameters:
zVal Layer base elevation(above document ground plane). deltaZVal Layer thickness. Example:
PROCEDURE GetLayerHeights(layerHandle :handle; var baseElev, thickness :REAL); BEGIN GetLayerElevation(layerHandle, baseElev, thickness); baseElev := baseElev / (25.4 / GetPrefReal(152)); thickness := thickness / (25.4 / GetPrefReal(152)); END;
| GrayLayer | Layers MiniCAD |
VectorScript Declaration:
PROCEDURE GrayLayer
; Python:
return None
def vs.GrayLayer(): Description:
Procedure GrayLayer sets the visibility status of the active layer to grayed. Objects on grayed layers will always appear grayed when viewed from other layers.
Example:
Layer('Future Construction'); GrayLayer; {grays the layer 'Future Construction'}
| HGetLayerTransp | Layers Vectorworks 2013 |
VectorScript Declaration:
FUNCTION HGetLayerTransp
( hLayer:HANDLE ) :REAL ; Python:
return REAL
def vs.HGetLayerTransp(hLayer): Description:
Get the transparency of the spcified layer.Parameters:
hLayer Handle to the layer. See Also:
HSetLayerTransp GetLayerTransparency
| HideLayer | Layers MiniCAD |
VectorScript Declaration:
PROCEDURE HideLayer
; Python:
return None
def vs.HideLayer(): Description:
Procedure HideLayer sets the visibility status of the active layer to hidden. Objects on hidden layers will not be viewable from other layers.
Example:
Layer('Future Construction'); HideLayer; {hides the layer 'Future Construction'}
| HSetLayerTransp | Layers Vectorworks 2013 |
VectorScript Declaration:
PROCEDURE HSetLayerTransp
( hLayer :HANDLE; transparency :REAL ) ; Python:
return None
def vs.HSetLayerTransp(hLayer, transparency): Description:
Set the transparency of the specified layer.Parameters:
hLayer Handle to the layer. transparency The transparency for the layer. Value between 0.0 and 100.0 See Also:
SetLayerTransparency HGetLayerTransp
| IsLayerReferenced | Layers VectorWorks10.0 |
VectorScript Declaration:
FUNCTION IsLayerReferenced
( layer :HANDLE; VAR pathname :STRING ) :BOOLEAN ; Python:
return (BOOLEAN, pathname)
def vs.IsLayerReferenced(layer): Description:
Returns whether a layer is workgroup referenced, and if so, the path to the source document is returned.Parameters:
layer Handle to the layer pathname On return, a string containing the path to the source document Result:
Returns true if the layer is referenced, false otherwise.
| Layer | Layers MiniCAD |
VectorScript Declaration:
PROCEDURE Layer
( name:STRING ) ; Python:
return None
def vs.Layer(name): Description:
Procedure Layer creates a new layer in a Vectorworks document. After creation, the new layer becomes the active layer of the document.
Layer can also be used to switch the active layer of the document. If the layer name passed to the procedure already exists, the procedure switches the active layer to the specified layer.
Single quotes should be avoided in layer names, as they will be treated as a mismatched string specifier, and will cause an error to be generated.
Parameters:
name Name of new or existing layer. Example:
Layer('Ductwork-1st Floor'); {creates a new layer named 'Ductwork-1st Floor'} Layer(newLayerName); {creates a new layer whose name is specified in the variable} Layer('Untitled-1'); {switches to the existing layer 'Untitled-1'}
| LayerRef | Layers MiniCAD4.0 |
VectorScript Declaration:
PROCEDURE LayerRef
( layerName:STRING ) ; Python:
return None
def vs.LayerRef(layerName): Description:
Procedure LayerRef places a layer reference (layer link) into the active layer at location (0,0).
Parameters:
layerName Name of referenced layer. Example:
LayerRef('Layer-2'); {creates a layer link of 'Layer-2' on the active layer}
| LFillBack | Layers MiniCAD |
VectorScript Declaration:
PROCEDURE LFillBack
( colorR :INTEGER; colorG :INTEGER; colorB :INTEGER ) ; Python:
return None
def vs.LFillBack(color): Description:
Procedure LFillBack sets the background fill color for the active layer. RGB values are in the range of 0~65535.
Parameters:
color RGB color component value. Example:
LFillBack(65535,0,39321);
| LFillFore | Layers MiniCAD |
VectorScript Declaration:
PROCEDURE LFillFore
( colorR :INTEGER; colorG :INTEGER; colorB :INTEGER ) ; Python:
return None
def vs.LFillFore(color): Description:
Procedure LFillFore sets the foreground fill color for the active layer. RGB values are in the range of 0~65535.Parameters:
color RGB color component value. Example:
LFillFore(65535,0,39321);
| LLayer | Layers MiniCAD |
VectorScript Declaration:
FUNCTION LLayer
:HANDLE ; Python:
return HANDLE
def vs.LLayer(): Description:
Function LLayer returns a handle to the last layer in a Vectorworks document.
| LPenBack | Layers MiniCAD |
VectorScript Declaration:
PROCEDURE LPenBack
( colorR :INTEGER; colorG :INTEGER; colorB :INTEGER ) ; Python:
return None
def vs.LPenBack(color): Description:
Procedure LPenBack sets the background pen color for the active layer. RGB values are in the range of 0~65535.Parameters:
color RGB color component value.
| LPenFore | Layers MiniCAD |
VectorScript Declaration:
PROCEDURE LPenFore
( colorR :INTEGER; colorG :INTEGER; colorB :INTEGER ) ; Python:
return None
def vs.LPenFore(color): Description:
Procedure LPenFore sets the foreground pen color for the active layer. RGB values are in the range of 0~65535.Parameters:
color RGB color component value.
| NumLayers | Layers MiniCAD |
VectorScript Declaration:
FUNCTION NumLayers
:INTEGER ; Python:
return INTEGER
def vs.NumLayers(): Description:
Function NumLayers returns the current number of layers within the active document.
| NumObj | Layers MiniCAD |
VectorScript Declaration:
FUNCTION NumObj
( h:HANDLE ) :LONGINT ; Python:
return LONGINT
def vs.NumObj(h): Description:
Function NumObj returns the number of objects on the referenced layer.
Parameters:
h Handle to layer.
| RemoveStoryLevel | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION RemoveStoryLevel
( storyHandle :HANDLE; levelType :STRING; bDeleteLayer :BOOLEAN ) :BOOLEAN ; Python:
return BOOLEAN
def vs.RemoveStoryLevel(storyHandle, levelType, bDeleteLayer): Description:
Removes the Story Level matching 'levelType' from a Story. If 'bDeleteLayer' is true and the Story Level has an associated layer, the layer will be deleted as well.Parameters:
storyHandle The handle of the story we want to deleted a Story Level from. levelType The level type of the Story Level we want to remove from 'storyHandle'. bDeleteLayer If this is true, and the requested Story Level has a layer associated with it, the layer will be deleted as well. Result:
Whether a Story Level with 'layerType' was found in the Story and successfully removed.Example:
VAR storyHandle : HANDLE success:BOOLEAN BEGIN storyHandle := CreateStory('Floor 1', '-1'); success := RemoveStoryLevel(storyHandle, 'Finish Floor', TRUE);See Also:
CreateStory AddStoryLevel
| ResetDefStoryLevels | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION ResetDefStoryLevels
( bDeleteExisting:BOOLEAN ) :BOOLEAN ; Python:
return BOOLEAN
def vs.ResetDefStoryLevels(bDeleteExisting): Description:
Clears default story levels and repopulates the list from XML data files on disk.Parameters:
bDeleteExisting Whether to delete existing default story levels before reloading the original defaults. Result:
Whether clearing the previous default story levels and loading the default list from disk succeeded.See Also:
GetLevelTemplateName SetLevelTemplateName GetLevelTemplateInfo GetNumLevelTemplates
| SetDefStoryLayerName | Layers Vectorworks 2013 |
VectorScript Declaration:
FUNCTION SetDefStoryLayerName
( index :INTEGER; name :STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.SetDefStoryLayerName(index, name): Description:
Sets the name of the nth Default Story Layer in the file. For example, if 3 is passed in, it will set the name of the 3rd Default Story Layer in the file.Parameters:
index The index of the default story layer whose name should be set. name The name that the indicated default story layer should be set to. Result:
Whether the setting of the name of the default story layer succeeded. It will fail if passed an invalid index. The name must not have more than 63 characters and must not be used by another default story layer in the file.Example:
VAR result : BOOLEAN; BEGIN result := SetStoryLayerTemplateName(2, "Subfloor");See Also:
GetNumStoryLayerTemplates GetStoryLayerTemplateName
| SetLayerElevation | Layers VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE SetLayerElevation
( h :HANDLE; baseElev :REAL; thickness :REAL ) ; Python:
return None
def vs.SetLayerElevation(h, baseElev, thickness): Description:
Sets the elevation and thickness of the specified layer.Parameters:
h Handle to the layer baseElev Base elevation of the layer thickness Thickness of the layer See Also:
GetLayerElevation
| SetLayerLevelType | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION SetLayerLevelType
( layer :HANDLE; layerLevelType :STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.SetLayerLevelType(layer, layerLevelType): Description:
Sets the Layer Level Type of a Layer. If the type passed in does not exist or if it already used by another Layer on the same Story, then the operation will fail.Parameters:
layer The Layer for which the Layer Level Type is being set. layerLevelType The Layer Level Type. Result:
Whether the attempt to set the Layer Level Type was successful.Example:
SetLayerLevelType(ActLayer, 'LT_SLAB');See Also:
GetLayerLevelType CreateLayerLevelType
| SetLayerOptions | Layers VectorWorks8.5 |
VectorScript Declaration:
PROCEDURE SetLayerOptions
( layerOpts:INTEGER ) ; Python:
return None
def vs.SetLayerOptions(layerOpts): Description:
Sets layer visibility setting for the active document.
Visibility Index Active Only 1 Gray Others 2 Gray/Snap Others 6 Show Others 3 Show/Snap Others 4 Show/Snap/Modify Others 5 Parameters:
layerOpts New layer visibility setting for document. See Also:
GetLayerOptions
| SetLayerRenderMode | Layers VectorWorks10.0 |
VectorScript Declaration:
PROCEDURE SetLayerRenderMode
( theLayer :HANDLE; newRenderMode :INTEGER; immediate :BOOLEAN; doProgress :BOOLEAN ) ; Python:
return None
def vs.SetLayerRenderMode(theLayer, newRenderMode, immediate, doProgress): Description:
Sets the render mode of the referenced layer.Parameters:
theLayer Handle of the layer newRenderMode New render mode to set immediate If true, then all rendering will take place before the call returns. Otherwise, any rendering that can take place in the background will be postponed until program execution re-enters the main event loop doProgress controls whether progress information is displayed during the operation
| SetLayerTransparency | Layers VectorWorks12.0 |
VectorScript Declaration:
PROCEDURE SetLayerTransparency
( transparency:REAL ) ; Python:
return None
def vs.SetLayerTransparency(transparency): Description:
Procedure SetLayerTransparency assigns a transparency percentage value to the active design layer. If a sheet layer is active, the procedure has no effect. The transparency value must be between 0.0 and 100.0, inclusive.
The design layer will only be imaged with transparency on systems which support it, like Quartz on the Mac. Setting the transparency to a value greater than 0, when the current transfer mode is Copy (i.e. 8, Paint mode), will also automatically change the layer transfer mode to OR (i.e. 9, Overlay). Similarly, setting the transparency to 0, when the current transfer mode is not set to Copy, will also automatically change the layer transfer mode to Copy. This is to approximately preserve the appearance of the drawing when imaging on systems that don't support transparency, like Windows.See Also:
CopyMode
| SetLevelElevation | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION SetLevelElevation
( storyHandle :HANDLE; levelType :STRING; newElevation :REAL ) :BOOLEAN ; Python:
return BOOLEAN
def vs.SetLevelElevation(storyHandle, levelType, newElevation): Description:
Sets the elevation of a Story Level relative to its Story.Parameters:
storyHandle The handle of the Story with the desired Story Level. levelType The level type of the Story Level to change the elevation of. newElevation The new elevation for the Story Level. Result:
Whether the Story Level was found and successfully updated.See Also:
CreateStory AddStoryLevel RemoveStoryLevel
| SetLevelTemplateName | Layers Vectorworks 2015 |
VectorScript Declaration:
FUNCTION SetLevelTemplateName
( index :INTEGER; name :STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.SetLevelTemplateName(index, name): Description:
Sets the name of the Story Level Template at 'index' to be 'name'.Parameters:
index The index of the Story Level Template. name The new name for the Story Level Template at 'index'. Result:
Whether the function succeeded in setting the name.Example:
VAR result : BOOLEAN; BEGIN result := SetStoryLevelTemplateName(2, "Subfloor");See Also:
| SetLevelTypeName | Layers Vectorworks 2013 |
VectorScript Declaration:
FUNCTION SetLevelTypeName
( index :INTEGER; name :STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.SetLevelTypeName(index, name): Description:
Sets the name of the nth Level Type in the file. For example, if 3 is passed in, it will set the name of the 3rd Level Type in the file.Parameters:
index The index of the level type whose name is being set. name The name the indicated level type should be set to. Result:
Whether the setting of the name of the level type succeeded. It will fail if passed an invalid index. The name must not have more than 63 characters and must not be used by another level type in the file.Example:
VAR result : BOOLEAN; BEGIN result := SetLayerLevelTypeName(2, "Subfloor");See Also:
GetNumLayerLevelTypes GetLevelTypeName
| SetLScale | Layers MiniCAD6.0 |
VectorScript Declaration:
PROCEDURE SetLScale
( h :HANDLE; scale :REAL ) ; Python:
return None
def vs.SetLScale(h, scale): Description:
Procedure SetLScale sets the scale of the referenced layer.
Calculating the ScaleTo calculate the scale parameter from an architecural scale, the following formula may be used :
denominator/numerator * true size(in inches) = ActualSize For example, to calculate a scale of 3/8"=1'-0", the scale parameter would be 8/3 *12 = 32.
Parameters:
h Handle to layer. scale Scale value for layer. Example:
SetLScale(HandleToLayer,96); {sets the referenced layer to a scale of 1/8" = 1'}
| SetScale | Layers MiniCAD |
VectorScript Declaration:
PROCEDURE SetScale
( actualSize:REAL ) ; Python:
return None
def vs.SetScale(actualSize): Description:
Procedure SetScale sets the drawing scale of the active layer of the document.
Calculating the ScaleTo calculate the scale parameter from an architecural scale, the following formula may be used :
denominator/numerator * true size(in inches) = ActualSize For example, to calculate a scale of 3/8"=1'-0", the scale parameter would be 8/3 *12 = 32.
Parameters:
actualSize Drawing scale factor.
| SetSheetLayerUserOrigin | Layers VectorWorks10.5 |
VectorScript Declaration:
FUNCTION SetSheetLayerUserOrigin
( layerHandle :HANDLE; xOrigin :REAL; yOrigin :REAL ) :BOOLEAN ; Python:
return BOOLEAN
def vs.SetSheetLayerUserOrigin(layerHandle, xOrigin, yOrigin): Description:
Sets the user origin of the specified sheet layer.
| SetStoryElevation | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION SetStoryElevation
( story :HANDLE; elevation :REAL ) :BOOLEAN ; Python:
return BOOLEAN
def vs.SetStoryElevation(story, elevation): Description:
Sets the elevation of the indicated Story. Returns whether the elevation was successfully set. If the elevaton change would cause Layers associated with the Story to overlap Layers associated with another Story, then the change in elevation will be prevented.Parameters:
story The Story whose elevation is to be set. elevation The elevation to set the Story to. Result:
Whether the elevation is successfully changed.See Also:
CreateStory GetStoryElevation
| SetStorySuffix | Layers Vectorworks 2012 |
VectorScript Declaration:
FUNCTION SetStorySuffix
( story :HANDLE; suffix :STRING ) :BOOLEAN ; Python:
return BOOLEAN
def vs.SetStorySuffix(story, suffix): Description:
Sets the suffix of the indicated Story. Returns whether the suffix was successfully set. If the suffix is already used by another Story, then the change in suffix will be prevented.Parameters:
story The story whose suffix is being set. suffix The new value of the suffix of the indicated Story. Result:
Whether the suffix is successfully changed.See Also:
GetStorySuffix SetStoryElevation
| SetZVals | Layers MiniCAD4.0 |
VectorScript Declaration:
PROCEDURE SetZVals
( zDistance :REAL (Coordinate); deltaZDistance :REAL (Coordinate) ) ; Python:
return None
def vs.SetZVals(zDistance, deltaZDistance): Description:
Procedure SetZVals sets the Z (layer base elevation) and delta Z (layer thickness) for the active layer.Parameters:
zDistance Layer base elevation (above document ground plane). deltaZDistance Layer thickness. Example:
PROCEDURE Example; VAR baseElevation, thickness :REAL; BEGIN Layer('Test Layer'); baseElevation := 1; thickness := 3; SetZVals(baseElevation, thickness); END; RUN(Example);
| ShowLayer | Layers MiniCAD |
VectorScript Declaration:
PROCEDURE ShowLayer
; Python:
return None
def vs.ShowLayer(): Description:
Procedure ShowLayer sets the visibility status of the active layer to visible. Newly created layers always defaulted to the Show mode.
Example:
Layer('Future Construction'); ShowLayer;