Sign in to follow this  
Followers 0
DomC

Level Types Attached to Story

1 post in this topic

Hi

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
    #vs.AlrtDialog(str(l_name))
    s = vs.GetStoryChoiceStrsN(StoryHandle, 2) #not clear
    #vs.AlrtDialog(str(len(s)))
    
    if levelType != LevelName:
        vs.AlrtDialog('Check Difference Template and LayerLevelTypes')
    
    if level_elevation == 0.0 and template_elevation != 0.0:
        pass
        #vs.AlrtDialog(LevelName+' is not used on this story')
        
    else:
        pass
        #vs.AlrtDialog(LevelName+'  '+str(elevation))


        

 

 

 

Edited by DomC
0

Share this post


Link to post
Share on other sites

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  
Followers 0