Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 1.71 KB

File metadata and controls

66 lines (52 loc) · 1.71 KB

AddLevelFromTemplate

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.

FUNCTION AddLevelFromTemplate(
				storyHandle : HANDLE;
				index       : INTEGER): BOOLEAN;
def vs.AddLevelFromTemplate(storyHandle, index):
    return BOOLEAN

Parameters

Name Type Description
storyHandle HANDLE The handle of the Story to add the new Story Level to.
index INTEGER The index of the Story Level Template to use when creating the Story Level.

Examples

VAR

storyHandle : HANDLE
success:BOOLEAN

BEGIN

storyHandle := CreateStory('Floor 1', '-1');
success := AddLevelFromTemplate(storyHandle,1);
resultOK := AddLevelFromTemplate(storyHandle, 1);
import vs

# Adds a new Story Layer to the Story pointed to by 'storyHandle', using the
# Story Level Template at 'index' as a template.
storyHandle = vs.FSActLayer()  # handle to the first selected object on the active layer
index = 1

ok = vs.AddLevelFromTemplate(storyHandle, index)
if ok:
    vs.Message('AddLevelFromTemplate succeeded')
else:
    vs.Message('AddLevelFromTemplate failed')

See Also

VS Functions: CreateStory | AddStoryLevel | RemoveStoryLevel | SetLevelElevation | GetLevelElevation

Version

Availability: from Vectorworks 2015

Category