Hi Gang, Because the objects you are selecting are not in the schematic itself, you can't use the normal geGetSelSet() or geGetSelectedSet() functions. Instead you have to use geGetObjectSelectedSet(). This provides information not only on the object selected, but it's hierarchical context - in this case it has the instance id of the instance on which the pin resides. The actual object you're selecting is the pin figure, so you have to get from the rectangle (say) to the pin, to the terminal to find its name. Here's what geGetObjectSelectedSet() returns (in my case, with a few such pins selected): ((db:0x1bb1b392 ((db:0x1bb1e412 0 0 0)) ) (db:0x1bb1b39a ((db:0x1bb1e412 0 0 0)) ) (db:0x1bb1b396 ((db:0x1bb1e412 0 0 0)) ) (db:0x1bb1bda0 ((db:0x1bb1e415 0 0 0)) ) ) Here's some code to use that information to show something interesting: foreach(objInfo geGetObjectSelectedSet() printf("Pin %s on instances %s\n" car(objInfo)->pin~>term~>name caaadr(objInfo)~>name) ) In my case, this prints: Pin vtune on instance I1 Pin vcobnd on instance I1 Pin vcocalen on instance I1 Pin PLUS on instance V2 The caaadr is just a shorthand to pull out the instance object. We don't care too much about the other values (the three zeros) - these are related to iterated instances, and mosaic arrays and columns (which won't be relevant here - I think in a schematic these would always be zero). Regards, Andrew.
↧