Home > Community > Forums > PCB SKILL > Extract information from pins of a certain spacing class property


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

 Extract information from pins of a certain spacing class property 

Last post Mon, Apr 29 2013 8:02 AM by fxffxf. 1 replies.
Started by mesaman000 29 Apr 2013 07:29 AM. Topic has 1 replies and 603 views
Page 1 of 1 (2 items)
Sort Posts:
  • Mon, Apr 29 2013 7:29 AM

    Extract information from pins of a certain spacing class property Reply

    Hi everyone,

        From my previous post I've found out how to color pads and vias of the certain spacing class that I'm looking for.  As the title states, now I'm trying to extract and print information from those nets to a report.  Basically I want to parse through all of the nets and filter out/select all of the pads/pins with that spacing class property which I do by using this code:

      axlClearObjectCustomColor(axlDBGetDesign() ->nets)

    ;Select all nets/pins

    axlSetFindFilter( ?enabled (list "noall" "pins"  "invisible")  ?onButtons (list "pins"))


    pins = axlGetSelSet()



    csetNets1 = axlSelectByProperty("net", "SPACING_CONSTRAINT_SET", "TYPE1")

    ;;Extract which nets have the spacing class property "TYPE1"

    cset1_pins = setof(pin, pins, member(pin ->net, csetNets1))




    From there I want to  take csetx_pins and print them out to a report.. I want the report to look like this:





    CurrentTime : Mar 25 09:31:46 2013 


    Pin name x coord        y coord Mirrored? Rotation            SPAC_CLASS PAD_NAME Net_name


    Q7.2 58.5 23.0 NO  270 degrees TYPE1 SR061X046 CONT_+3.3V

    C1807.2 26.0 23.0 NO  270 degrees TYPE1 SR110X100 CONT+5V

    Q2.1  42.0 23.0 NO  270 degrees TYPE2 SO220X064 GND


    Q3.2 58.5 23.0 YES  270 degrees TYPE1 SR061X046 CoNT_+3.3V

    C17.2 26.0 23.0 YES  270 degrees TYPE2 SR110X100 CONT+5V

    Q9.1  42.0 23.0 YES  270 degrees TYPE3  SO220X064 GND

    As you can tell I'd like the report sorted by the mirrored property first to determine which pins are on the back of the board and the front of the board.  Then I'd like to sort the report by spacing class (TYPE1, TYPE2, TYPE3)

     Here's what I have so far:


     cl_file = outfile("net_list.rpt" "w")

    ; ------ Print Header 

    fprintf(cl_file "**********************\n")

    fprintf(cl_file "Report\n")

    fprintf(cl_file "**********************\n\n")

    ; ------  Print CurrentTime

    fprintf(cl_file "CurrentTime : %s \n" getCurrentTime())


    ; ------  Print column headers

    fprintf(cl_file "Pin name \t x-coord \t y coord \t Mirrored? \t Rotation \t Spacing class \t Pad type \t Net name\n")






    foreach(comp_dbid l_comp_dbids




    ;pins= symbol_dbid->component->pins





    fprintf(cl_file "%s \t\t %L\t\t %s\t\t %4.0f degrees \n" ref_des xy_loc mirrorstatus rotationstatus)



    Can anyone help guide me in a more efficient direction because it seems like this is not the most efficient method..
    Thank you very much! 
    • Post Points: 20
  • Mon, Apr 29 2013 8:02 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 298
    • Points 4,735
    Re: Extract information from pins of a certain spacing class property Reply
    From an efficiency standpoint look at the following:
    1. get all nets  axlDBGetDesign()->nets
    2. for a net, get all pins on the net use the API: axlPinsOfNet(net 'pin)
    3. cset assigned to net (this assumes you have a dbid of a net assigned to a variable "net")

    You would need to do more work get to the spacing cset is assigned using groups (netclass, bus, diffpair, etc.) For example, you place the nets into NetClass' and then assign the spacing cset at the net class level. You can use


    after step 2 and then get the  SPACING_CONSTRAINT_SET off of the netclass

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by mesaman000 at 29 Apr 2013 07:29 AM. Topic has 1 replies.