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.
I use the following:
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 +invisiblesetwindow pcbdefine gridsetwindow form.gridFORM grid non_etch non_etch_x_grids $gridvalueFORM grid non_etch non_etch_y_grids $gridvalueFORM grid all_etch all_etch_x_grids $gridvalueFORM grid all_etch all_etch_y_grids $gridvalueFORM 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.
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
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.
Bram those are cool :), The line width change is really nice and the ENV change sure beats a reload of the editor.
Best Regards 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