I want to add, or really append, a new menu item to the Allgro PCB Editor menu. What is the easiest way to handle this without having to modify the installed menu? Maybe someone has an example that I could follow?
I thought I had this posted somewhere on the forum but I cannot find it. Here is the details of a solution that I have used:
Most users just update the main menu file for Allegro "allegro.men" located at %CDSROOT%\share\pcb\text\cuimenus or copy it to a different location for modification then retarget their MENUPATH variable in Allegro to the updated menu. All of this is really not recommended because your updates could be overrriden during a software update or your locally update Menu file could become out of date which could lead to software issues.
There is SKILL AXL functionality in Allegro 16.3 forward which allows you to add menus/append your own menus to the Cadence default menu dynamically during startup. This eliminates the need to maintain and support a local Allegro.men file or update the Allegro.men in the Cadence software hierarchy. You can get some background information about the function "axlUIMenuInsert" in %CDSROOT%\share\pcb\examples\skill\DOC\FUNCS (File name: axlUIMenuInsert.txt).
To demonstrate this new functionality I created a small example of the SKILL Code and attached it to this post: 1.) Unzip the ZIP file in your local C:\ folder will create the folder "C:\Dynamic_Menus" with two folders "PCBENV" and "SKILL_Lib". 2.) Add or Update your Windows Environment Variable "ALLEGRO_PCBENV" and point to the path "C:\Dynamic_Menus\PCBENV" 3.) Open up Allegro and you will find "Valor Tools" and "SKILL Tools" menus.
The SKILL Library folder "C:\Dynamic_Menus\SKILL_Lib" contains 3 SKILL programs downloaded from Sourcelink and the SKILL Script that creates the dynamic menu: HL_NPE.IL = Highlight Missing Pin Escapes HL_NTP.IL = Highlight Missing Test Points VALOR_EXT.IL = Valor Extracts to generate data files from ODB++ Inside MIKEC_DYNAMIC_MENUS.IL = SKILL code used to create new menus
In order for the above files to work you need to load them during startup using the "allegro.ilinit" file which I have in "C:\Dynamic_Menus\PCBENV". This loads all the SKILL code above.
Hope this helps,Mike CatrambonePlexus Engineering Solutions
In reply to mcatramb91:
Thank you, that was very helpful. I can see the light at the end of the tunnel.
I basically used your file as a template to create my own. Upon open Allegro, I get the following mesage in the command pane.
MENU UPDATES COMPLETE = Standard Cadence allegro + CustomizationsW- *WARNING* (axlUIMenuInsert): Invalid string - nil
Any ideas? I can't seem to see what would be wrong with my file. I have attached my SKILL file to this post. I know I am close, but I am obviously missing something.
In reply to chads108:
Upon further investigation, it appears that the "SEPARATOR" line in the GridsMenu function is causing the problem. What is the correct syntax for this to work in this instance?
Never mind my previous post. I figured it out.
Thank you again for your help.
One more question. Is there any easy way to control which menus load with which tools? For instance, my custom Grids menu would be useful in PCB Editor and PCB Librarian, but custom manufacturing menus would not really apply to PCB Librarian, so I really would rather that menu only show up in PCB Editor.
Cool, I am glad it worked for you. Certainly easier to maintain vs. having to remember to update the standard Allegro.men file.
I checked out your SKILL code. Wow! You have a lot of grid settings in the GRIDS menu, pretty cool. I don't have as many grid scripts so I defined a function key to reply the scripts quickly:
funckey g1 "replay grid1.scr"funckey g2.5 "replay grid2_5.scr"funckey g5 "replay grid5.scr"funckey g25 "replay grid25.scr"funckey g.1 "replay grid100.scr"
Just type g1 on the Allegro command line to replay the grid1.scr. I couldn't imagine setting as many function keys for all those different grids that you have but it is still good info any way so I figured I would share the funckey tip as well.
I believe it is possible to load a different menu depending on the tool you open but I haven't had time to research it further. There are certain items in our custom menus that are only relevant when working in the Symbol editor or when running PCB SI. It would be nice to load a different custom menu depending on the tool you open. If you figure it out let me know.
For design types (e.g brd, mcm etc) see the doc for the function axlDesignTypeFor just dra vs everything else axlIsSymbolEditorFor either of these you can use axlUIMenuRegister since you need to perform the test at menu load time. For these you need to use the axlTriggerSet with a registered callback function (see example file below).I don't believe their is a easy way of telling the difference between product levels except using some of the dynamic underscore env variables (do a "set" cmd and look at the end of the list generated). Some are documented in allegro.men but others you will need to reverse engineer. To differentiate between SI and PCB you allegro t menu loading via the axlTriggerSet('menu ...) then you can look at the menu name in the callbacks 1st argument.Allegro's menu is "allegro" while SI is "spectraquest". You can look the menu example file in <cdsroot>/share/pcb/examples/skill/ui/menu.il.
For design types (e.g brd, mcm etc) see the doc for the function
For just dra vs everything else
For either of these you can use axlUIMenuRegister since you need to perform the test at menu load time. For these you need to use the axlTriggerSet with a registered callback function (see example file below).
I don't believe their is a easy way of telling the difference between product levels except using some of the dynamic underscore env variables (do a "set" cmd and look at the end of the list generated). Some are documented in allegro.men but others you will need to reverse engineer.
To differentiate between SI and PCB you allegro t menu loading via the axlTriggerSet('menu ...) then you can look at the menu name in the callbacks 1st argument.Allegro's menu is "allegro" while SI is "spectraquest". You can look the menu example file in <cdsroot>/share/pcb/examples/skill/ui/menu.il.
I was able to figure out how to make the menus load based on the tool being used. Granted I only use PCB Editor and Symbol Editor, but it does work for those two. I ahve attached the code so you could see what worked for me.
is this menu skill also available for concept hdl?
In reply to JuergenWeber:
You can certainly add custom menus to Concept. SKILL vs Allegro SKILL is quite a different animal. What exactly are you wanting to accomplish?
i need a QuickPick Browser Interface with a listed power cells.
I have this infomation from Design Entry User Guide :
Before using the QuickPick toolbar in Allegro Design Entry HDL, ensure that you specify standard library cells to appearunder appropriate component categories such as Power, Ground, Ports, Taps, and Page Borders.This information, bydefault, is stored in the qpsetup.qps file at the CSF search location. For example, a location can be:cdssetup/concept in the site area.To set up the QuickPick Browser:1. Open an instance of the command window.2. Type qpsetup and press ENTER.
Qpsetup does't work by me!
Thanks for help
The Quick Pick toolbar is set up using <Cadence Install>\tools\fet\bin\QPSeEditor.exe (browse to it and run). It is pretty self explanitory what it is looking for. Make sure the path to the setup file is pointing to either your user cdssetup\concept folder in your HOME variable, or your site cdssetup\concept folder in your CDS_SITE variable. When you save it, it will write out a .qps file which the Quickpick menu uses for the appropriate symbols from your library.
Hope this helps.
Thank you Chad,
now works all fine :-)
Is there a way to handle more than one "popup" in the dynamic menu? I have this text in the SKILL file:
; Create Symbol Editor Menu Entries;
SymToolsMenu = '( (popup "Text") ("Change Textsize..." "replay textsize") ("Textsize 1..." "replay text1" ) ("Textsize 8..." "replay text8" ) (popup "Custom Tools") ("Review Tool..." "skill _rt") ("Create Pad Shape..." "skill ns_spad") ("Clear SS 0.15mm..." "clear pin silk 0.15 0.2") ("Clear SS 0.13mm..." "clear pin silk 0.13 0.2") ("--------------------" "") ("&mm<->mils..." "conv"))
Using this just creates "Custom Tools" as a submenu of "Text". I would like a separate menu item. Any ideas?