# # Given a quilt or set of quilts, for each, list the model it belongs to # It's best used for a single quilt, and can be helpful if you've segregated data across layers # package require PWI_Glyph 2.3 # procedure to let the user select quilts # returns a list of such quilts proc selectQuilts { } { set thisMask [pw::Display createSelectionMask -requireDatabase [list Quilts] ] pw::Display selectEntities \ -description "Select the Quilts you want to list" \ -selectionmask $thisMask selection set listOfQuilts $selection(Databases) } proc listQuilts { listOfQuilts } { set dbs [list] foreach thisQuilt $listOfQuilts { set name [$thisQuilt getName] set thisModel [$thisQuilt getModel] set modelName [$thisModel getName] set modelLayer [$thisModel getLayer] puts [ format "%s belongs to Model %s (layer %s)" $name $modelName $modelLayer ] } } #================================Start processing============================== # Start timer set startTime [clock seconds] puts [ format " Time now is [clock format $startTime -format %H:%M:%S] " startTime ] set listOfQuilts [selectQuilts ] listQuilts $listOfQuilts # End timer set endTime [clock seconds] puts "" puts "Script executed in [expr $endTime-$startTime] seconds, [clock format $startTime -format %H:%M:%S], [clock format $startTime -format %D] "