```diff -u /tmp/readspice.tcl /usr/local/lib/magic...
# magic
m
Copy code
diff -u /tmp/readspice.tcl /usr/local/lib/magic/tcl/readspice.tcl
--- /tmp/readspice.tcl  2020-11-12 13:40:11.084220100 -0800
+++ /usr/local/lib/magic/tcl/readspice.tcl      2020-11-12 13:40:17.416992000 -0800
@@ -124,6 +124,11 @@
                   set p $p1
               }

+              select top cell
+              select area labels
+              set all [lindex [what -list] 1]
+              select clear
+
               foreach pin [lrange $ftokens 2 end] {
                  # If "=" is in the name, then we have finished the pins
                  # and are looking at parameters, and so parsing is done.
@@ -173,10 +178,6 @@
                  # port name.  If so, convert it into a port

                  if {$pinidx == ""} {
-                     select top cell
-                     select area labels
-                     set all [lindex [what -list] 1]
-                     select clear
                      foreach labrec $all {
                          set testpin [lindex $labrec 0]
                          if {[string tolower $testpin] == [string tolower $pin]} {