Home > Community > Forums > PCB Design > Change the grid size while routing in Allegro with a hotkey, Keep routing at the same time

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

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

Last post Tue, Jul 16 2013 6:23 PM by ScottCad. 8 replies.
Started by ScottCad 12 Jul 2013 03:34 PM. Topic has 8 replies and 1404 views
Page 1 of 1 (9 items)
Sort Posts:
  • Fri, Jul 12 2013 3:34 PM

    • ScottCad
    • Top 50 Contributor
    • Joined on Fri, May 25 2012
    • Roswell, GA
    • Posts 176
    • Points 2,775
    Change the grid size while routing in Allegro with a hotkey, Keep routing at the same time Reply

    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.

    • Post Points: 20
  • Sat, Jul 13 2013 1:04 PM

    • B Bruekers
    • Not Ranked
    • Joined on Wed, Feb 10 2010
    • Son, Netherlands
    • Posts 8
    • Points 245
    Re: Change the grid size while routing in Allegro with a hotkey, Keep routing at the same time Reply

     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. 

     

    • Post Points: 20
  • Sat, Jul 13 2013 7:13 PM

    • ScottCad
    • Top 50 Contributor
    • Joined on Fri, May 25 2012
    • Roswell, GA
    • Posts 176
    • Points 2,775
    Re: Change the grid size while routing in Allegro with a hotkey, Keep routing at the same time Reply

    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 

      

    • Post Points: 20
  • Sun, Jul 14 2013 8:50 AM

    • B Bruekers
    • Not Ranked
    • Joined on Wed, Feb 10 2010
    • Son, Netherlands
    • Posts 8
    • Points 245
    Re: Change the grid size while routing in Allegro with a hotkey, Keep routing at the same time Reply

     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

    • Post Points: 20
  • Mon, Jul 15 2013 12:59 PM

    • ScottCad
    • Top 50 Contributor
    • Joined on Fri, May 25 2012
    • Roswell, GA
    • Posts 176
    • Points 2,775
    Re: Change the grid size while routing in Allegro with a hotkey, Keep routing at the same time Reply

    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

    • Post Points: 20
  • Tue, Jul 16 2013 2:55 AM

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

    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 

    • Post Points: 35
  • Tue, Jul 16 2013 4:09 AM

    • stump1019
    • Top 200 Contributor
    • Joined on Thu, Jul 17 2008
    • Hopkinton, MA
    • Posts 37
    • Points 635
    Re: Change the grid size while routing in Allegro with a hotkey, Keep routing at the same time Reply

    Anyone have one that would rotate components in 90 degree increments and/or mirror while the component is in manual place mode on your cursor?

    • Post Points: 20
  • Tue, Jul 16 2013 4:29 AM

    • B Bruekers
    • Not Ranked
    • Joined on Wed, Feb 10 2010
    • Son, Netherlands
    • Posts 8
    • Points 245
    Re: Change the grid size while routing in Allegro with a hotkey, Keep routing at the same time Reply

    This topic starts to deviate from the original question :)

    For rotating components:

    funckey r iangle 90

     

    For mirroring components:

    funckey m mirror

    • Post Points: 5
  • Tue, Jul 16 2013 6:23 PM

    • ScottCad
    • Top 50 Contributor
    • Joined on Fri, May 25 2012
    • Roswell, GA
    • Posts 176
    • Points 2,775
    Re: Change the grid size while routing in Allegro with a hotkey, Keep routing at the same time Reply

    Nayyier in Allegro I dont believe you can just find text. There are certain things that can be found using the find option. Those things are divided into particular items.

    They are. Net, Symbol or pin, Device Type, Symbol Type etc. If you click on find there is a pop down dialog that lists all the items you can look for.

    I had looked for a reference on all available commands in the past but couldnt find everything in one place. Perhaps someone might chime in if they know a good resource.

    Thanks Scott. 

    • Post Points: 5
Page 1 of 1 (9 items)
Sort Posts:
Started by ScottCad at 12 Jul 2013 03:34 PM. Topic has 8 replies.