## ## Get a list of connectors, and for each, list the domains connected ## package require PWI_Glyph 2.3 # procedure to let the user select connectors # returns a list of such connectors proc selectConnectors { } { set conMask [pw::Display createSelectionMask -requireConnector [list] \ -blockConnector "Pole"] pw::Display selectEntities \ -description "Select the connectors you want to list" \ -selectionmask $conMask selection set cons $selection(Connectors) } proc listCons { cons } { set dbs [list] foreach con $cons { set name [$con getName] puts [ format "%s used by" $name ] set connectedDomains [pw::Domain getDomainsFromConnectors $con] set numberofconnectedDomains [llength $connectedDomains] set iNum 0 foreach thisDomain $connectedDomains { set domName [$thisDomain getName] set layerOfDomain [$thisDomain getLayer] set iNum [ expr { $iNum + 1} ] puts [ format " %4d: %s (Layer %d)" $iNum $domName $layerOfDomain] } puts " " } } #================================Start processing============================== # Start timer set startTime [clock seconds] puts [ format " Time now is [clock format $startTime -format %H:%M:%S] " startTime ] set cons [selectConnectors ] listCons $cons # 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] "