• 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. Change the grid size while routing in Allegro with a hotkey...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 167
  • Views 19479
  • 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

Change the grid size while routing in Allegro with a hotkey, Keep routing at the same time

ScottCad
ScottCad over 12 years ago

When routing a design more often than not I change the grid when routing.

I created a hotkey to do this and indeed the grid does change but when the hotkey executes I loose the cline segment I had picked.

here is the macro

funckey 1 "define grid;etchedit;setwindow form.grid;FORM grid non_etch non_etch_x_grids 100;FORM grid non_etch non_etch_y_grids 100;FORM grid all_etch all_etch_x_grids 100;FORM grid all_etch all_etch_y_grids 100;FORM grid done"

If I am routing in a trace I can go up to the tool bar and change the grid spacing for all the etch and click ok in that dialog. The grid spacing changes and I dont loose my picked trace so I can keep on routing with the new grid settings.

Does anyone know how to create a macro to do this. It would be a time saver...I just want to be able to change the grid in an easy way while routing at the same time ... lol :) without having to select a menu to do it.

Thanks Scott.

  • Cancel
  • B Bruekers
    B Bruekers over 12 years ago

     I use the following:

    in PCBENV:

    funckey g 'settoggle gridvalue 0.1 0.25 0.5 1 2 5 10; replay gridset $gridvalue;echo grid = $gridvalue'

     

    Create a scriptfile called gridset.scr:

    scriptmode +invisible
    setwindow pcb
    define grid
    setwindow form.grid
    FORM grid non_etch non_etch_x_grids $gridvalue
    FORM grid non_etch non_etch_y_grids $gridvalue
    FORM grid all_etch all_etch_x_grids $gridvalue
    FORM grid all_etch all_etch_y_grids $gridvalue
    FORM grid done

     

    With this I don't loose the cline while routing. (or other things)

    The pre defined grid figures ( 0.1 0.25 0.5 1 2 5 10) you can just change to anything that you need. 

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ScottCad
    ScottCad over 12 years ago

    Hello thanks for the tip. "It works Awesome"  :) Thats just so cool.....

    By way of a give back here are two macros that I find handy perhaps they might be of use. Add to your PCBENV

     First one handles finding reference dez in a easy way

    funckey f "prepopup ; pop dyn_option_select 'Selection set@:@Clear all selections' ; set prompt ; prompt 'Find Ref Des' ; refdes $prompt ; zoom selection"

    The second one is a variant of the first I use it for finding net names

    funckey n "prepopup ; pop dyn_option_select 'Selection set@:@Clear all selections' ; set prompt ; prompt 'Find Net Name' ; net $prompt ; zoom selection"

    Thanks again for your help

    Scott 

      

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • B Bruekers
    B Bruekers over 12 years ago

     Hi Scott

    Thanks for those things. They can come handy sometime. Usally i work with the capture schematic next to Allegro, so just click the part on the schematic and allegro jumps to the part on the PCB.

    Maybe some other things that can be useful:

    This sets the line width, even while routing:

    funckey l 'settoggle linewidth 0.15 0.2 0.3 0.5 1; form mini acon_line_width $linewidth;echo width=$linewidth '

     

    Quick snapping to objects: 

    funckey v "prepopup;pop dyn_option_select 'Snap pick to@:@Via'"

    The @Via you can change to what you need. (as like the sub menu in the RMB) e.g. @Pin, @Intersection, @Symbol Origin, etc

     

    I didn't liked to search for the ENV file everytime to add or change somethings. Therefore these 2 lines can be really useful:

    funckey CEnd  Shell notepad $localenv/env

    funckey CHome 'source -q $localenv/env; echo ENV file reloaded'

    So, ctrl-end opens the ENV file in notepad (i assume you are using windows), then you can change it, save and close it. 

    With ctrl-home you re-load the ENV file. 

     

    Kind regards,

    Bram

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ScottCad
    ScottCad over 12 years ago

    Bram those are cool :), The line width change is really nice and the ENV change sure beats a reload of the editor.

    Thanks

     Best Regards Scott

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Nayyierwajih
    Nayyierwajih over 12 years ago

    Hi Scott

    Thanks these are really usefull

    can you please tell me why the below is not working, i want to find text on the board 

    funckey t "prepopup ; pop dyn_option_select 'Selection set@:@Clear all selections' ; set prompt ; prompt 'Find Text' ; text $prompt ; zoom selection"

    or from where we can learn these commands

    Regards

    Nayyier 

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