Home > Community > Forums > PCB SKILL > Selecting objects based on their layer

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Selecting objects based on their layer 

Last post Wed, Jan 3 2007 9:58 AM by archive. 7 replies.
Started by archive 03 Jan 2007 09:58 AM. Topic has 7 replies and 2044 views
Page 1 of 1 (8 items)
Sort Posts:
  • Wed, Jan 3 2007 9:58 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    Selecting objects based on their layer Reply

    Hello,
    I'm new to SKILL and need some help with selecting objects.  I would like to know if it's possible to create a selection set of certain objects base on their layer name.  For example I want to select all of the clines on layer L02.  Is that possible, and if so, how can I do it?

    Thanks in advance,
    Mark


    Originally posted in cdnusers.org by mgore@amkor.com
    • Post Points: 0
  • Wed, Jan 3 2007 11:02 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Selecting objects based on their layer Reply

    Mark
    I'll assume you have a grounding in programming in a high level OOP language so I'll just put some pseudocode here for you.
    Basically your routine could be something like:

    a = axlDBGetDesign()
    an = a -> nets ;"an" now contains a list of all net objects in the db
    foreach net in an
    iterate n times, x = nth(n an) -> branches ; and x is now a list of the nets branches
    foreach branch in x
    iterate n times, y = nth(n x) -> children ; and y is now a liost of that branches children
    foreach child in y
    iterate n times, z = nth(n y)
    if z -> objType == "path"
    && if z -> layer == "ETCH/L02"
    then
    zs = z -> segments
    and then
    se = zs -> startEnd

    and so on
    There are very likely more efficient ways to do the same thing and an experienced Skill programmer would find them. But in a pinch all you need to know is the basic db structure and use some simple loops to match the stuff you want.

    Good luck...
    Ashcan


    Originally posted in cdnusers.org by AshCan
    • Post Points: 0
  • Wed, Jan 3 2007 11:23 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Selecting objects based on their layer Reply


    See which is an example of selecting all shapes on ROUTE_KEEPOUT/ALL but can be easily
    modified to select all CLINES on one or more layers.


    Originally posted in cdnusers.org by fxf
    • Post Points: 0
  • Wed, Jan 3 2007 11:51 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Selecting objects based on their layer Reply

    Thanks, I'm your basic old LiSP programmer for AutoCAD.  I'm teaching myself SKILL to help automate in the Cadence tool now as well.

    I appreciate the help, thanks again.
    Mark


    Originally posted in cdnusers.org by MarkG
    • Post Points: 0
  • Wed, Jan 3 2007 11:53 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Selecting objects based on their layer Reply

    Hi fxf,
    I'm not sure where you're pointing me to.  Could you be more specific as to the code you're talking about.  I really appreciate all this help.

    Thanks,
    Mark


    Originally posted in cdnusers.org by MarkG
    • Post Points: 0
  • Wed, Jan 3 2007 12:11 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Selecting objects based on their layer Reply


    Apparently this message board doesn't like brackets (one of its many problems).

    Code examples is @: {cdsroot}/share/pcb/examples/skill/axlcore/ashpoly.il

    which is an example of selecting all shapes on ROUTE_KEEPOUT/ALL but can be easily
    modified to select all CLINES on one or more layers.


    Originally posted in cdnusers.org by fxf
    • Post Points: 0
  • Wed, Jan 3 2007 12:12 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Selecting objects based on their layer Reply


    a backet test


    Originally posted in cdnusers.org by fxf
    • Post Points: 0
  • Wed, Jan 3 2007 12:14 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Selecting objects based on their layer Reply

    Ok, thanks for the info.

    Mark


    Originally posted in cdnusers.org by MarkG
    • Post Points: 0
Page 1 of 1 (8 items)
Sort Posts:
Started by archive at 03 Jan 2007 09:58 AM. Topic has 7 replies.