• 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. Allegro X PCB Editor
  3. How to select the objects in the user defined area

Stats

  • State Verified Answer
  • Replies 5
  • Answers 1
  • Subscribers 159
  • Views 10814
  • Members are here 0
More Content

How to select the objects in the user defined area

krthik15
krthik15 over 3 years ago

Hello,

is there a way to select only the objects which is highlighted in the red color user defined area (triangle)?

  • Sign in to reply
  • Cancel
  • mstaub
    +1 mstaub over 3 years ago

    Short answer, yes. There are multiple ways you could approach this. One way, assuming the triangle exists as a shape in your design is to select the shape, get the polygon object from it and use the axlAddSelectPoly() function where:

    axlSetFindFilter(?enabled '("noall" "shapes") ?onButtons '("shapes"))

    when(axlSelect(?prompt "Select a shape.")

    o_polyObj = car(axlPolyFromDB(car(axlGetSelSet())))

    axlClearSelSet()

    ;Set the find filter to whatever you want to select within the shape, in this case let's just select all symbols

    axlSetFindFilter(?enabled '("noall", "symbols"), ?onButtons '("symbols"))

    axlAddSelectPoly(o_polyObj t)

    l_symbols = axlGetSelSet()

    axlClearSelSet()

    )

    At this point 'l_symbols' will contain a list of dbids of all symbols contained within that triangle.  If the triangle shape doesn't exist in the design, but you know the coordinates, you could always programmatically create the shape (either by hard-coding the coordinates or have the user draw one). Reference axlPathStart() and it's associated functions. 

    axlAddSelectPoly() has some quicks though. For example if you have some additional text in your symbol definition and that text is visible when you use axlAddSelectPoly(). The function will select the symbol even if just the smallest fragment of the text is within the boundary of the shape. Because of that you might want to use axlGeoPointInShape() instead. You could select all objects in a design a check whether the objects 'xy' is within the shape using axlGeoPointInShape()

    Hope this helps. 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • krthik15
    0 krthik15 over 3 years ago in reply to mstaub

    Thank you mstaub. It should work. But i am not able to find the axlAddSelectPoly() function in allegro skill document.  i am using "17.2-2016 S070" .

    is axlSubSelectPoly() function available ? if possible please share the syntax of these  functions .

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mstaub
    0 mstaub over 3 years ago in reply to krthik15

    You're right, I can't seem to find any documentation on it either. I'm guessing it's just an undocumented function. I am currently using it in multiple tools I wrote, so I can assure you it's working. I found one blog post saying it was introduced in Hotfix 50, so if you are on 70 you should be able to use it. 

    I have the following in my notes:

    axlAddSelectPoly(o_polyDbid b_include_voids)

    Where:

    o_polyDbid = the dbid of the poly object

    b_include_voids = t: include voids in selection, nil: don't include voids in selection.

    If you don't feel comfortable using that function, you can get very similar results using axlGeoPointInShape(), which is documented. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • krthik15
    0 krthik15 over 3 years ago in reply to mstaub

    Thankyou mstaub ! axlAddSelectPoly() function is working well..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Schulz Jordan
    0 Schulz Jordan over 3 years ago

    Yes, suppose you need only symbols in the area then under find filter enable symbols. Use selection filter - select by path and draw a path (area) to select the objects.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Cadence Guidelines

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