## ## Get a connector, print its handle and it's name ## 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 } { foreach con $cons { set name [$con getName] puts [ format "Connector Name = %s" $name ] puts [ format "Connector Handle = %s" $con ] } } #================================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] "