Home > Community > Forums > PCB SKILL > Access via properties

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

 Access via properties 

Last post Mon, May 7 2012 6:14 PM by luanvn81. 6 replies.
Started by luanvn81 19 Apr 2012 08:01 PM. Topic has 6 replies and 2465 views
Page 1 of 1 (7 items)
Sort Posts:
  • Thu, Apr 19 2012 8:01 PM

    • luanvn81
    • Top 150 Contributor
    • Joined on Fri, Sep 18 2009
    • dnai, Vietnam
    • Posts 58
    • Points 875
    Access via properties Reply

     Hi everyone!

       How can I get properties of Connected lines: , Connected vias: , Connected shapes:  in a Via.

        I have tried to use this: 

    ............................

               foreach(via allViasInDesign
                   fprintf(writeOutFile "%L", via->Connected->pins)
                                                                       .........................................

               ...But  it returns to nil.  I wan to get layer name in "Connected lines: , Connected vias: , Connected shapes:" . Please help me.

     

     

     LISTING: 1 element(s)

                  < VIA >              

      origin-xy:    (-7031.130 -14189.120)

      part of net name:  GND
      Connected lines:     1 ( BL )
      Connected vias:      1 ( AL2 )
      Connected shapes:    1 ( AL2 )

      Padstack name:   VIA-BL-AL-50
      Type:            bbvia

      padstack defined from AL2 to BL
      rotation:  0.000  degrees
      Via is not mirrored

     Luan.

    Tks.

    • Post Points: 35
  • Fri, Apr 20 2012 12:22 AM

    • Pawandeep
    • Top 75 Contributor
    • Joined on Sat, Oct 15 2011
    • Singapore, 00-SG
    • Posts 106
    • Points 1,690
    RE: Access via properties Reply
    Hi Luan,

    You should consider using axlDBGetConnect function to get the attached items on a via.
    • Post Points: 20
  • Fri, May 4 2012 8:27 PM

    • luanvn81
    • Top 150 Contributor
    • Joined on Fri, Sep 18 2009
    • dnai, Vietnam
    • Posts 58
    • Points 875
    Re: RE: Access via properties Reply

     Hi!

      I have tried to do it but not success, I only want to get the layers that via connect to (line, shape pin)

    ex:    Connected lines:     1 ( TOP )                      ===> TOP

            Connected shapes:    1 ( BOTTOM )         ===> BOTTOM

    who can help me  ?

    Thank.

    Luan.

    • Post Points: 5
  • Fri, May 4 2012 11:39 PM

    • Randy R
    • Top 50 Contributor
    • Joined on Wed, Jul 16 2008
    • Dupont, WA
    • Posts 192
    • Points 3,025
    Re: Access via properties Reply

    See if this helps.  It should list all the via connections.  With some minor modifications, you can put the data into a list/array and they output it based on object type.

    axlSetFindFilter(?enabled list( "noall" "vias")
    ?onButtons list( "noall" "vias"))
    axlAddSelectAll()

    allViasInDesign = axlGetSelSet()
    foreach(via allViasInDesign
      via_connects = axlDBGetConnect(via t)
      foreach(via_connect via_connects
        printf("Object Type = %s,  Layer = %s\n", via_connect->objType via_connect->layer)
      );end foreach
      println("-----------------------------")
    );end foreach

    Good Luck

    Good Day, R².
    • Post Points: 20
  • Sat, May 5 2012 1:27 AM

    • luanvn81
    • Top 150 Contributor
    • Joined on Fri, Sep 18 2009
    • dnai, Vietnam
    • Posts 58
    • Points 875
    Re: Access via properties Reply

     Hi ! Thank for your reply!

      Your code works OK but if  a via connect to Pin (via on pad) ==> DRC occur  :

     E- *Error* fprintf/sprintf: format spec. incompatible with data - "Format is '%s, %s\n', argument #2 is nil"

       how can i get the layer if it connect to pin?

    Thank.

    Luan

    • Post Points: 20
  • Mon, May 7 2012 8:28 AM

    • Randy R
    • Top 50 Contributor
    • Joined on Wed, Jul 16 2008
    • Dupont, WA
    • Posts 192
    • Points 3,025
    Re: Access via properties Reply

    The following will work for non-through-hole pins.  You can add additional case statements if needed.

    axlSetFindFilter(?enabled list( "noall" "vias")
    ?onButtons list( "noall" "vias"))
    axlAddSelectAll()

    allViasInDesign = axlGetSelSet()
    foreach(via allViasInDesign
      via_connects = axlDBGetConnect(via t)
      foreach(via_connect via_connects
        cnt_obj = via_connect->objType
        cnt_lyr = via_connect->layer
        case( cnt_obj
          ("pin"
            cnt_start = car(via_connect->startEnd)
            cnt_end = cadr(via_connect->startEnd)
            cnt_lyr = if( (cnt_start == cnt_end) cnt_start "***unknown***")
          );end pin section
        );end case
        printf("Object Type = %s,  Layer = %s\n", cnt_obj cnt_lyr)
      );end foreach
      println("-----------------------------")
    );end foreach

    Good Day, R².
    • Post Points: 20
  • Mon, May 7 2012 6:14 PM

    • luanvn81
    • Top 150 Contributor
    • Joined on Fri, Sep 18 2009
    • dnai, Vietnam
    • Posts 58
    • Points 875
    Re: Access via properties Reply

     Hi!

      It's really works as my  intention, thank for your code.

    Luan.

    • Post Points: 5
Page 1 of 1 (7 items)
Sort Posts:
Started by luanvn81 at 19 Apr 2012 08:01 PM. Topic has 6 replies.