• 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 Scripting - Skill
  3. What Is Returned from dbid->pins->startEnd

Stats

  • State Verified Answer
  • Replies 3
  • Subscribers 19
  • Views 1986
  • Members are here 0
More Content

What Is Returned from dbid->pins->startEnd

MarkGorecki
MarkGorecki over 2 years ago

My code:

symDbidList = setof(symDbid axlDBGetDesign()->symbols symDbid->component->class == "DISCRETE")

;For each symbol dbid in the list, get X, Y,ref des, rotation, and comp name
smdOutput = outfile("./POD_SMD_Table.txt" "w")
foreach( symDbid symDbidList
symLoc = symDbid->xy
symLocX = car(symLoc)
symLocY = cadr(symLoc)
symRefDes = symDbid->refdes
symRot = symDbid->rotation
symName = symDbid->name
pinObj = (car (symDbid->pins))
pinLayer = pinObj->startEnd

pinLayer = ("CONDUCTOR/L06" "CONDUCTOR/L06")

I used:

layTxt1 = ( nthelem 1 pinLayer) which gave me "CONDUCTOR/L06"

I want to get the "L06" part of what looks like a string, but parsing using "/" doesn't work, and neither does substring.

Can someone please tell me how to get the "L06" portion from layTxt1?

Thanks

  • Cancel
  • Sign in to reply
  • JuanCR
    +1 JuanCR over 2 years ago

    Since pinLayer is a string, you can use the following command to get the "L06" substring from it: 

    strpbrk( pinLayer "L"); which is the same as strpbrk( "CONDUCTOR/L06" "L")

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • MarkGorecki
    0 MarkGorecki over 2 years ago in reply to JuanCR

    Hi Juan, thank you very much, that worked!  I don't understand why substring didn't work, but I'm going to use your suggestion.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • B Bruekers
    0 B Bruekers over 2 years ago

    Parsestring splits the string in a list of strings. Since you are interested in the 2nd part of the string use cadr().

    cadr(parseString("CONDUCTOR/L06" "/"))  -> "L06"

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • 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