Checking for layers and auto assigning materials
I tried creating a small script which would assign materials to the appropriate layers. My only problem is that if a layer doesn't exist, the code stops and does not execute. Using this method:
$'Layer:ROOF_3D'.material = meditMaterials
$'Layer:BRICK_WALL'.material = meditMaterials
$'Layer:BRICK_COURSE'.material = meditMaterials
How could I check for a layer and if not present ignore it and move to the next line?
Also, this is kinda a 2 part request but each layer not only has set material defs but also they have material id's because of the multi/sub object materials being used. Notice the code above shows material for both the Brick_wall and Brick_course layers. Brick_wall needs to be set to material id=1 and Brick_course set to =2.