VS:CreateLevelTemplate

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

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.
FUNCTION CreateLevelTemplate(
layerName  :STRING;
scaleFactor  :REAL;
levelType  :STRING;
elevation  :REAL;
wallHeight  :REAL;
VAR index  :INTEGER) : BOOLEAN;
def vs.CreateLevelTemplate(layerName, scaleFactor, levelType, elevation, wallHeight):
    return (BOOLEAN, index)

Parameters

layerName STRING 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 REAL The scale factor for the (optional) layer associated with this Story Level Template.
levelType STRING 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 REAL The elevation of the Story Level Template, relative to the height of the story in which the level is used.
wallHeight REAL 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 INTEGER After the function is called, this parameter contains the index of the new Story Level Template.

Return Value

Whether the Story Level Template was successfully created.

Example

VAR

success:BOOLEAN;

BEGIN

success := CreateLevelTemplate('Mod-Slab', 1, 'LT_Slab', 0, 6);

Version

Availability: from Vectorworks 2015

See Also

VS Functions:

VS:GetNumLevelTemplates | VS:GetLevelTemplateName | VS:SetLevelTemplateName | VS:DeleteLevelTemplate | VS:GetLevelTemplateInfo

VS Functions:

[[VS:GetNumLevelTemplates]] | [[VS:GetLevelTemplateName]] | [[VS:SetLevelTemplateName]] | [[VS:DeleteLevelTemplate]]

| [[VS:GetLevelTemplateInfo]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox