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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
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.