Jump to content

Level Types Attached to Story


DomC

Recommended Posts

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
Link to comment

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.

Guest
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.

×
×
  • Create New...