package require PWI_Glyph 2.17.3 # # Key in the BC name, and this script moves all associated entities to a layer # set bcName "Walls" set targetLayer 201 # get all entities related to this BC set thisBC [pw::BoundaryCondition getByName $bcName] set listOfDomains [$thisBC getEntities ] # move all to target layer set thisCollection [pw::Collection create] $thisCollection set $listOfDomains $thisCollection do setLayer $targetLayer pw::Layer setDescription $targetLayer [format "Segregated BC: %s" $bcName] $thisCollection delete pw::Display isolateLayer $targetLayer puts [ format "Segregated entities from BC named '%s' to layer %d (and renamed the layer)" $bcName $targetLayer]