Home > Community > Forums > PCB SKILL > axlSelectByProperty

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: *

 axlSelectByProperty 

Last post Wed, Jun 4 2014 7:30 AM by Kot13. 2 replies.
Started by Kot13 03 Jun 2014 12:10 PM. Topic has 2 replies and 1936 views
Page 1 of 1 (3 items)
Sort Posts:
  • Tue, Jun 3 2014 12:10 PM

    • Kot13
    • Not Ranked
    • Joined on Wed, Apr 25 2012
    • Posts 8
    • Points 215
    axlSelectByProperty Reply

    Hi all,
    I have a script that places external DRC's into a design based off of some checks that are performed. Mostly spacing checks.

    I'm trying to generate a list of only the external DRC's by using the command:
       axlSelectByProperty("DRC", "EXTERNAL_VIOLATION_DESCRIPTION")
    However it always return:
       nil

    If I use the following code I can get my list:

    axlSetFindFilter(?enabled (list "noall"  "DRCS") ?onButtons (list "DRCS"))
    Drc_List = axlGetSelSet(axlAddSelectAll())

    then I can use to determine what type of DRC each on is:

    foreach((drc Drc_List drc_t = drc-> type println(drc_t))) --->

    "DESIGN"
    "DESIGN"
    "EXTERNAL REFERENCE"
    "EXTERNAL REFERENCE"
    "EXTERNAL REFERENCE"
    "EXTERNAL REFERENCE"
    "EXTERNAL REFERENCE"

    ....

    I have tried various syntax for the axlSelectByProperty() command but always get nil returned.

    Am I using the command correctly? If not can somebody help me with the correct syntax?

    Thanks in advance,

    -K 

    • Post Points: 20
  • Wed, Jun 4 2014 5:59 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 296
    • Points 4,710
    Re: axlSelectByProperty Reply

    An easier and faster method:

         design = axlDBGetDesign()

         waivedDRCs = setof(item design->drcs item->type == "EXTERNAL REFERENCE")

    If user might have waived some them also do 'setof' on deisgn->waived

    • Post Points: 20
  • Wed, Jun 4 2014 7:30 AM

    • Kot13
    • Not Ranked
    • Joined on Wed, Apr 25 2012
    • Posts 8
    • Points 215
    Re: axlSelectByProperty Reply

     Thanks a lot!

    This method is working and is much better than the path I was going down.

     

    As for the axlSelectByProperty method, I used that as a referance from some skill code that I found on line. Looks like maybe a property name has changed between Allegro releases...

     

    Thanks again,

    -K 

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by Kot13 at 03 Jun 2014 12:10 PM. Topic has 2 replies.