• 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. Display pads coordinates

Stats

  • State Suggested Answer
  • Replies 4
  • Answers 1
  • Subscribers 17
  • Views 1193
  • Members are here 0
More Content

Display pads coordinates

piorog
piorog 6 months ago

Hey community!

I would like to display coordinates (and maybe some more useful information) about the padstacks used in the footprint (.dra file). I have managed to prepare the script that shows that information in the command window, but I would prefer to have it displayed in some more user friendly way (for example below the padstack, with the ability to toggle the visibility using some shortcut). Is there any way to achieve such thing? I would be very grateful for some similar examples, as I have no experience with making custom UI in Cadence.

  • Sign in to reply
  • Cancel
Parents
  • eDave
    0 eDave 6 months ago

    defun( Piorog ()
    let((txtBlk, txtOrientation, txtHeight, layerName, text, yLoc)
    txtBlk = axlUIPrompt(lsprintf("Enter text block integer (between 1 and %d)", axlDBControl('maxTextBlock)))
    when(txtBlk && readstring(txtBlk) <= axlDBControl('maxTextBlock)
    foreach(side, '("TOP", "BOTTOM")
    txtOrientation = make_axlTextOrientation(?textBlock txtBlk, ?justify "center", ?mirrored side == "BOTTOM")
    txtHeight = axlGetParam(lsprintf("paramTextBlock:%s" txtBlk)) ->height
    sprintf(layerName, "BOARD GEOMETRY/PIN_INFO_%s", side)
    axlLayerCreateNonConductor(layerName)
    axlVisibleLayer(layerName, t)
    axlDeleteByLayer(layerName, 'fixed)
    foreach(symbol, setof(sym, axlDBGetDesign() ->symbols, if(side == "TOP" then !sym ->isMirrored else sym ->isMirrored))
    foreach(pin, symbol ->pins
    sprintf(text, "%L", pin ->xy)
    yLoc = lowerLeftY(pin ->bBox) - txtHeight
    axlDBCreateText(text, list(car(pin ->xy), yLoc), txtOrientation, layerName, symbol); Create the text and attach it to the symbol
    )
    )
    )
    axlVisibleUpdate(t)
    )
    ))

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • eDave
    0 eDave 6 months ago

    defun( Piorog ()
    let((txtBlk, txtOrientation, txtHeight, layerName, text, yLoc)
    txtBlk = axlUIPrompt(lsprintf("Enter text block integer (between 1 and %d)", axlDBControl('maxTextBlock)))
    when(txtBlk && readstring(txtBlk) <= axlDBControl('maxTextBlock)
    foreach(side, '("TOP", "BOTTOM")
    txtOrientation = make_axlTextOrientation(?textBlock txtBlk, ?justify "center", ?mirrored side == "BOTTOM")
    txtHeight = axlGetParam(lsprintf("paramTextBlock:%s" txtBlk)) ->height
    sprintf(layerName, "BOARD GEOMETRY/PIN_INFO_%s", side)
    axlLayerCreateNonConductor(layerName)
    axlVisibleLayer(layerName, t)
    axlDeleteByLayer(layerName, 'fixed)
    foreach(symbol, setof(sym, axlDBGetDesign() ->symbols, if(side == "TOP" then !sym ->isMirrored else sym ->isMirrored))
    foreach(pin, symbol ->pins
    sprintf(text, "%L", pin ->xy)
    yLoc = lowerLeftY(pin ->bBox) - txtHeight
    axlDBCreateText(text, list(car(pin ->xy), yLoc), txtOrientation, layerName, symbol); Create the text and attach it to the symbol
    )
    )
    )
    axlVisibleUpdate(t)
    )
    ))

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • piorog
    0 piorog 6 months ago in reply to eDave

    Thank you very much! I will need to adjust it to work with .dra files, but from what I see on .brd it works exactly how it should!

    • 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