• 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 read values from the list

Stats

  • Replies 3
  • Subscribers 159
  • Views 12933
  • Members are here 0
More Content

How to read values from the list

KARPCB
KARPCB over 9 years ago

Hi all!

I have read all text attributes from my symbols using following skill Expression.

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

axlAddSelectBox()

sym=axlGetSelSet()

axlClearSelSet()

foreach(one sym

chi = one->children

foreach(two chi

chi1 = two->text

printf("%L" chi1))))

* I have selected only two footprints J20 P12 *

CIW return value:

"6.5"".2559""5.54"".2181""2.54"".1000""RECOMMENDED BOARD THICKNESS 1.60 MM TO 2.40 MM""WIRE ENTRY SIDE""S160H110""C160H110""282834_2_2PIN-282834-2""J20""J20"nilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnilnil"LEAD LENGTH:2.41 MM""68000_X01_HDR-1P-68000-401HLF""C152H102_P08M08""P12""P12""P12"nilnilnilnilnilnilnilnilnil

From this texts(list) I need to read only recommended board thickness and lead length values. Anyone please show me to do that.

After reading those values I will give external value(real board thickness) through form field and compare the board thickness and lead length.

Regards,

Karthik.K

  • Sign in to reply
  • Cancel
  • eDave
    eDave over 9 years ago
    axlSetFindFilter(?enabled '("noall", "SYMBOLS"), ?onButtons '("SYMBOLS"))
    axlAddSelectBox()
    sym = axlGetSelSet()
    axlClearSelSet()
    foreach(one sym
    chi = one ->children
    foreach(two chi
    chi1 = two ->text
    when(index(chi1, "RECOMMENDED BOARD THICKNESS") || index(chi1, "LEAD LENGTH")
    printf("%s\n" chi1)
    )
    )
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • KARPCB
    KARPCB over 9 years ago

    Dave,

    I got error while loading.

    E- *Error* index: argument #1 should be a string (type template = "tS") - nil

    Actually, I need only the value of "RECOMMENDED BOARD THICKNESS" and "LEAD LENGTH"

    CIW return value :

    1.60 MM TO 2.40 MM

    2.41 MM

    -karthik.k

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Kirti Sikri
    Kirti Sikri over 9 years ago
    That's because some ch1 are nil so when you try to index them you get that error. You can try checking for nil before indexing. New code is axlSetFindFilter(?enabled '("noall", "SYMBOLS"), ?onButtons '("SYMBOLS"))
    axlAddSelectBox()
    sym = axlGetSelSet()
    axlClearSelSet()
    foreach(one sym
    chi = one ->children
    printf("chi is %L\n" chi)
    foreach(two chi
    chi1 = two ->text
    if(chi1 then
    when(index(chi1, "RECOMMENDED BOARD THICKNESS") || index(chi1, "LEAD LENGTH")
    printf("%s\n" chi1)
    )
    )
    )
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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