Quantcast
Channel: Cadence PCB Design Forum
Viewing all articles
Browse latest Browse all 5525

PCB editor command to select a module instance by name?

$
0
0

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


Viewing all articles
Browse latest Browse all 5525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>