Do You Really Need the Human In the Loop?
Consider : I ask: Comment on the attached TCL code being used with S-Edit proc tgl_port_lbl {} { if { 0 == [expr [find port -scope selection -goto none -add -count] + [find netlabel -scope selection -goto none -add -count] ] } { puts "Must select a port or label" return } copy delete mode renderoff set dsn [database design -active] (Yes, there's more, but this is the part we need to focus on.. for now) And the Sphinx says: The selection check is functional, but a bit noisy This works: if { 0 == [expr [find port -scope selection -goto none -add -count] + [find netlabel -scope selection -goto none -add -count] ] } { But it is more complicated than it needs to be. Since this is numeric comparison, it is fine, but readability would improve if the counts were broken out: set nports [find port -scope selection -goto none -add -c...