I am looking for a comand in skill to get the list of elements under a polygonal shape.
There is a command
here the output of this command is a list of elements. But this command only takes the input as a list of two points.
I want to give a list of more number of points as input to the code and the output it will return a list of elements under the polygon formed by the list of input points.
If anybody knows how to get it done please repply.
The only way to do this is to decompose the polygon into rectangles and run dbGetTrueOverlaps on each rectangle. If your polygons are not orthogonal, then you'll have to do some approximating. Cadence has a routine called dbLayerTile that will take an input shape and decompose it into trapezoids. If the original shape is orthogonal, then the results will be rectangles. The drawback to this routine is that it will actually create the trapezoids (or rectangles) in your layout where the source shapes are located. If you need to be able to work in a read-only mode, then you would have to mess around with a scratch cell to do your layer tiling. You alternative is to write your own polygon to trapezoid routine or find one out on the web.
Derek is correct, using dbLayerTile will break an orthogonal polygon into rectangles which can then be fed to dbGetTrueOverlaps. The first argument for dbLayerTile is a cellView ID so you could open a scratch cellView using dbOpenCellViewByType in "s" mode (including IC6.1.3) and create the resulting rectangles there. dbLayerTile returns the dbId's for the rectangles so you could then process them from there. I often open a scratch cellView and keep it open just for this type of issue, sharing it among multiple programs.
Thans a lot , it solved my problem.
But now I have one more issue that is when I am using " dbGetTrueOverlaps " command , if there is any Guardring or any multipartpath present inside that area, This command returns list of dbid of the multipartpath along with all the individual contacts and vias and layers.
I want dbID of the MultipartPath only.
And How to diferentiate a " Path " and a " Multipartpath " in the layout.
car(geGetSelSet()) ~>?? for both Path and Multipartpath gives the same kind of properties.
One way that you could check is to see if rodGetObj() returns a rod object id or nil, if a rodObj:0x... is returned, then the path is possibly a multipart path. Then you could check the subShapes attribute of the rodObject to see if the path is indeed a multi-part path, or just a named rod path with no sub-parts. (Create->Multipart Path could create a rod path with no subparts, but then it is really just a rod-named path).
I hope that this answers your question, or at least helps you.
Thank you Lawrence, because of you only now I have a bug free code.
Really it reduced my lot of work. Now I hve one more doubt How to get the dbid of last placed object in the layout,
because I want to get the dbid of the polygon but hiCreatepolygon does not return any dbid.