I'm looking to extract label cordinates of an instance based on how the instance is placed, i.e, after factoring in the orientation of the instance. Has anyone written code like this? For eg. x:y = 10:20 would become -10:20 after MY, 20:10 after MYR90
Thanks Derek. I got it to work.
procedure( dumpPins( file ) let( (inst cv fp x pins pin)
inst = car(geGetSelSet()) ;Required because I want to open the layout view, if instance is xform cv = dbOpenCellViewByType(inst~>master~>libName inst~>master~>cellName "layout") if( cv then fp = outfile(file)
pins = setof( x cv~>shapes (x~>objType=="label" && x~>lpp=='("AP" "pin")) ) foreach( pin pins ;Displacement occurs after mag is applied xy = dbTransformPoint(pin~>xy list(inst~>xy inst~>orient inst~>mag)) fprintf( fp "%s\t%f\t%f\n" pin~>theLabel float(round(car(xy))) float(round(cadr(xy))) ) ) dbClose(cv) close(fp) printf( "dumpPins: found %d pins in %L\n" length(pins) cv~>cellName ) else printf( "dumpPins: ERROR: Could not open %s/layout\n" cv~>cellName ) )))