Instances have a transform attribute that indicates the location and orientation of the instance relative to the cell in which it is placed. Select your I0 instance and type this in your CIW: trans = css()~>transform This will return something like: ((5.33 -9.35) "R0" 1.0) car(trans) is the xy location of the instance, cadr(trans) is the rotation of the instance and 1.0 is the magnification (typically not used, but here for backward compatibility) You can then take a shape from the master for instance I0 and use dbTransformPoint, dbTransformPointList or dbTransformBBox to translate coordinates from the lower cell to the upper cell. The second coordinate to these commands is the transform of the instance (trans) and the return value is the point, points or bBox in the top level coordinate space. For example: I0 is placed at 10,12, with an R90 orientation. r1 is the object id for a rectangle in I0 with bBox coordinates of: list(1:1 2:2) newTrans = dbTransformBBox(r1~>bBox trans) newTrans == ((8.0 13.0) (9.0 14.0)) If you need to combine transforms through two levels of hierarchy, you can use dbConcatTransform to combine two transforms at a time. Finally, you can use dbCopyFig to copy the shape from the lower level cell to the top cell and this command takes a transform as the third argument. I hope this helps. Derek
↧