• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. Need a Skill code to get a list of elements under a plygonal...

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 127
  • Views 22518
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need a Skill code to get a list of elements under a plygonal shape.

AmitBiswas
AmitBiswas over 16 years ago

I am looking for a comand in skill to get the list of elements under a polygonal shape.

There is a command

 

dbgetTrueOverlaps(
d_cellView
l_bBox
)

 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.

Regards,

Amit 

 


  • Cancel
  • dmay
    dmay over 16 years ago

    The "doneProc" for enterPolygon automatically passes the windowId the points and a t/nil (done) to indicate if the routine was completed or not. Cadence provides hooks for doneProcs or callbacks to some of their interactive routines and these are usually passed a fixed set of arguments. The documentation should explain what these arguments are. If you are having trouble finding the doc (or are too lazy to look it up), you can use the following trick to find out how many arguments are needed and what type of arguments they are:

    procedure(myPolygonDp(@optional a b c d)
       println(list(a b c d))
    )

    This will take an optional number of arguments and default the rest to nil. It will then print out their values. In the preceding example, it would be easy to see that the windowId and points are passed to the routine. It would be less clear what the second argument (done) is since you would simply get a t. There is usually enough information for me to write the routine. The code given in the documentation is self-explanatory since it checks the value of done and draws a polygon in w using pts.

    As for your second question, I have observed the same as you (the last object created appears first in the selectedSet for all objects). I do not know if this will work all the time. A safer approach could be to get a list of all objects in the cell. Call the leHiCreatePolygon code. Then get a new list of all the objects in the cell and identify which object is not in the original set.

    cv = geGetEditCellView()
    polygons = setof(x cv~>shapes x~>objType=="polygon")
    leHiCreatePolygon()
    newPolygon = car(setof(x cv~>shapes x~>objType=="polygon" && !memq(x polygons)))

    -Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Austin CAD Guy
    Austin CAD Guy over 16 years ago

     I have to agree with Derek, do not rely on the order of the data retrieved from the database. It is poor programming to rely on an undocumented order which may change depending on spaces in the virtual memory.

    You can also use @rest to get all the arguments regardless of the number and then print them:

     procedure(myPolygonDp2( @rest argList )
           println( argList )
    )

    The second argument is gets set to nil if you cancel the enterfunction so you can clean up your code, such as restoring data as it was before the command started.

    Ted

    - Derek - can you email me directly, I need to get some user input.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AmitBiswas
    AmitBiswas over 16 years ago
    I wan to create a form where some of the form fields will be automatically evaluated depending upon the other form field value.suppose metal width is one one form field and I want to calculate no. of row of via , will be calculated taking care of DRC in the form itself so that user can take a descision before proceeding further.All the calculation I will do but how to reflect the result of the calculation in the form itself.one example like during instantiating a resistor if width is independent variable, length will be calculated depending upon the vale of the resistor.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Austin CAD Guy
    Austin CAD Guy over 16 years ago

     Hi Amit

     Why don't you make this a new topic as it it is different from what we dicussed in this topic and may be of interest to others who will be creating forms. Then I will be able to answer and get the widest audience.

     

    Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AmitBiswas
    AmitBiswas over 16 years ago
    yes , you are right, I din't think of it.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
<

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information