Jump to content
Sign in to follow this  

Level Types Attached to Story

Recommended Posts


Frantically I search a way to find get LevelTypes, which are attached to a story. I can get LayerLevelTypes or LevelTemplates (can't find a difference). All Informations are available, but I have problems to find out, which LevelType is attached (hook) to a story. I tried to cross reference template elevation with elevation of the LevelType in a store. If it is not 0.0 and not identically with Template elevation it is definitely hooked to a story. But all others are uncertain .... my efforts so far:


StoryHandle = vs.GetStoryOfLayer(vs.ActLayer()) # Just to get a story handle
numLLT = vs.GetNumLayerLevelTypes() 
numTLT = vs.GetNumLevelTemplates() #Difference to GetNumLayerLevelTypes ?
if numLLT != numTLT:
    vs.AlrtDialog('Difference numLayerLEvelTypes and numLevelTemplates') #Never see a Difference?
for index in range(1, numLLT+1):
    LevelName = vs.GetLevelTypeName(index) #clear
    level_elevation = vs.GetLevelElevation(StoryHandle, LevelName) #clear
    BOOLEAN, layerName, scaleFactor, levelType, template_elevation, wallHeight = vs.GetLevelTemplateInfo(index) #clear
    story_name = vs.GetName(StoryHandle) #clear
    LFS_Handle = vs.GetLayerForStory(StoryHandle, LevelName) #clear
    l_name =  vs.GetLName(LFS_Handle) #clear
    s = vs.GetStoryChoiceStrsN(StoryHandle, 2) #not clear
    if levelType != LevelName:
        vs.AlrtDialog('Check Difference Template and LayerLevelTypes')
    if level_elevation == 0.0 and template_elevation != 0.0:
        #vs.AlrtDialog(LevelName+' is not used on this story')
        #vs.AlrtDialog(LevelName+'  '+str(elevation))





Edited by DomC

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...