Coordinates come in a variety of ways, depending on the objects you select. All instances have xy and bBox attributes. The xy will be the origin of the instance. The bBox will be the bounding box of the instance. All shapes have a bBox, but polygons and paths also have a set of points.
A bBox comes as a list of two coordinates: bBox = list(list(x1 y1) list(x2 y2))
To get the lower left: ll = car(bBox) or ll = lowerLeft(bBox)
To get the upper right: ur = cadr(bBox) or ur = upperRight(bBox)
ll = lowerLeft(item~>bBox)
ur = upperRight(item~>bBox)
("inst" printf("Instance %s of cell %s at xy = %L, ll = %L, ur = %L\n" item~>name item~>cellName item~>xy ll ur))
("rect" printf("Rectangle with ll = %L and ur = %L\n" ll ur))
("polygon" printf("Polygon with ll of extents at %L and ur of extents at %L and points %L\n" ll ur item~>points))
("path" printf("Path with ll of extents at %L and ur of extents at %L and points %L\n" ll ur item~>points))
This is basic Skill. You should take a look at the Skill user's guide. You should also explore available attributes on an object to see what you can do. Here is a simple thing to do:
Select one item in layout. Then in your CIW do this: x = css()
This will assign the "car of the selected set" or car(geGetSelSet()) to the variable x.
Then do this in the CIW: x~>?
This will show you the attribute names available on the selected item.
Then do this in the CIW: x~>??
This will show you the attribute names and values on the selected item.
Try this with instances, rectangles, paths, polygons, or any other objects you may be using.
You can also traverse these items as deep as you want. For example, if you select an instance in the layout, you can do the following:
inst = css()
instName = inst~>name
instMaster = inst~>master
termsInInst = instMaster~>terminals
This could also be done like this:
Time to dig out the manual.