• 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. PCB Design
  3. PCB editor command to select a module instance by name?

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 165
  • Views 13247
  • Members are here 0
More Content
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PCB editor command to select a module instance by name?

ashmanskas
ashmanskas over 10 years ago

In the past, I have automated the placement of components in Allegro PCB Editor by writing little programs that select components by reference designator and move them to program-calculated locations.  For instance, the following Python function writes out a fragment of a script that I can execute using "replay <scriptname>" in Allegro.  It uses "symbol <refdes>" to select a given symbol; then moves it to the desired location.

  def move(refnum, xpos, ypos, prefix="u"):
        ypos -= 1000
        print "setwindow pcb"
        print "generaledit"
        print "skill (axlClearSelSet)"
        print "pick 0 0"
        print "skill (axlClearSelSet)"
        print "symbol %s%d"%(prefix, refnum)
        print "move ; "
        print "pick %d %d ; "%(xpos, ypos)
        print "done"

I've recently started using modules, so I would like to move modules around rather than individual symbols.  So instead of selecting symbol U123 using "symbol U123" I would like to select module instance sampler_2 using some analogous command.  I can select objects by refdes using the "symbol" command and can select objects by net name using the "net" command.  I can't figure out what command can be used to select a module instance by name.  Or perhaps there is a way to use axlSingleSelectName in SKILL to select a module instance?  For example, I seem to be able to select the desired module with the SKILL expression (axlSingleSelectName "group" "sampler_2") but if I follow this by an Allegro "move" command, the module instance becomes unselected and Allegro prompts me with "Select element(s) to move."

Can anyone point me in the right direction?


Many thanks,

Bill

  • Cancel
Parents
  • ashmanskas
    ashmanskas over 10 years ago

    In case it helps anyone else, I found an answer to my own question.


    Whereas the command "symbol U1" will select the symbol having refdes "U1", this sequence of commands will select the module instance named "sampler_1":

    setwindow form.find
    FORM find name_type Module
    FORM find find_list Name
    FORM find find_name sampler_1
    setwindow pcb

    the rest of my symbol-moving script is unchanged.

    I figured this out by finding a way to select a module by name from the GUI (in the "Find" tab), then looking at the "allegro.jrl" journal file to see the equivalent sequence of commands to replay. 

    -Bill

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ashmanskas
    ashmanskas over 10 years ago

    In case it helps anyone else, I found an answer to my own question.


    Whereas the command "symbol U1" will select the symbol having refdes "U1", this sequence of commands will select the module instance named "sampler_1":

    setwindow form.find
    FORM find name_type Module
    FORM find find_list Name
    FORM find find_name sampler_1
    setwindow pcb

    the rest of my symbol-moving script is unchanged.

    I figured this out by finding a way to select a module by name from the GUI (in the "Find" tab), then looking at the "allegro.jrl" journal file to see the equivalent sequence of commands to replay. 

    -Bill

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data
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