Home > Community > Forums > PCB Design > Adding a new menu item to Allegro PCB Editor

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: *

 Adding a new menu item to Allegro PCB Editor 

Last post Wed, Jun 4 2014 6:50 AM by chads108. 23 replies.
Started by chads108 01 Aug 2012 07:26 AM. Topic has 23 replies and 7509 views
Page 1 of 2 (24 items) 1 2 Next >
Sort Posts:
  • Wed, Aug 1 2012 7:26 AM

    • chads108
    • Top 50 Contributor
    • Joined on Thu, Mar 29 2012
    • Plano, TX
    • Posts 162
    • Points 2,755
    Adding a new menu item to Allegro PCB Editor Reply

     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?

    Filed under: ,
    • Post Points: 20
  • Wed, Aug 1 2012 8:04 AM

    • mcatramb91
    • Top 75 Contributor
    • Joined on Thu, Jan 3 2013
    • Chelmsford, MA
    • Posts 97
    • Points 4,930
    Re: Adding a new menu item to Allegro PCB Editor Reply

    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 Catrambone
    Plexus Engineering Solutions

    • Post Points: 20
  • Wed, Aug 1 2012 9:28 AM

    • chads108
    • Top 50 Contributor
    • Joined on Thu, Mar 29 2012
    • Plano, TX
    • Posts 162
    • Points 2,755
    Re: Adding a new menu item to Allegro PCB Editor Reply

    Mike,

     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 + Customizations
    W- *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.

    Chad

     

    • Post Points: 5
  • Wed, Aug 1 2012 9:35 AM

    • chads108
    • Top 50 Contributor
    • Joined on Thu, Mar 29 2012
    • Plano, TX
    • Posts 162
    • Points 2,755
    Re: Adding a new menu item to Allegro PCB Editor Reply

     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?

     Chad

    • Post Points: 5
  • Wed, Aug 1 2012 9:40 AM

    • chads108
    • Top 50 Contributor
    • Joined on Thu, Mar 29 2012
    • Plano, TX
    • Posts 162
    • Points 2,755
    Re: Adding a new menu item to Allegro PCB Editor Reply

     Mike,

    Never mind my previous post.  I figured it out. 

    Thank you again for your help.

     

    Chad

    • Post Points: 20
  • Wed, Aug 1 2012 9:51 AM

    • chads108
    • Top 50 Contributor
    • Joined on Thu, Mar 29 2012
    • Plano, TX
    • Posts 162
    • Points 2,755
    Re: Adding a new menu item to Allegro PCB Editor Reply

     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.

    • Post Points: 20
  • Wed, Aug 1 2012 9:55 AM

    • mcatramb91
    • Top 75 Contributor
    • Joined on Thu, Jan 3 2013
    • Chelmsford, MA
    • Posts 97
    • Points 4,930
    Re: Adding a new menu item to Allegro PCB Editor Reply

    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.

    Have fun!

    Mike

    • Post Points: 5
  • Wed, Aug 1 2012 9:59 AM

    • mcatramb91
    • Top 75 Contributor
    • Joined on Thu, Jan 3 2013
    • Chelmsford, MA
    • Posts 97
    • Points 4,930
    Re: Adding a new menu item to Allegro PCB Editor Reply

    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.

    Regards,
    Mike

    • Post Points: 50
  • Wed, Aug 1 2012 10:50 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 291
    • Points 4,640
    Re: Adding a new menu item to Allegro PCB Editor Reply

    For design types (e.g brd, mcm etc) see the doc for the function

        axlDesignType

    For just dra vs everything else

         axlIsSymbolEditor

    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.

    • Post Points: 5
  • Wed, Aug 1 2012 11:57 AM

    • chads108
    • Top 50 Contributor
    • Joined on Thu, Mar 29 2012
    • Plano, TX
    • Posts 162
    • Points 2,755
    Re: Adding a new menu item to Allegro PCB Editor Reply

     Mike,

     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.

     Chad

    • Post Points: 20
  • Wed, Sep 12 2012 11:56 PM

    • JuergenWeber
    • Not Ranked
    • Joined on Thu, Feb 16 2012
    • Nuernberg, Bavaria
    • Posts 15
    • Points 255
    Re: Adding a new menu item to Allegro PCB Editor Reply

     Hi,

    is this menu skill also available for concept hdl?

     Best regard 

    Jürgen

    Juergen Weber GCD Printlayout GmbH 91056 Erlangen Germany
    • Post Points: 20
  • Thu, Sep 13 2012 9:03 AM

    • chads108
    • Top 50 Contributor
    • Joined on Thu, Mar 29 2012
    • Plano, TX
    • Posts 162
    • Points 2,755
    Re: Adding a new menu item to Allegro PCB Editor Reply

    You can certainly add custom menus to Concept.  SKILL vs Allegro SKILL is quite a different animal.  What exactly are you wanting to accomplish?

    Chad

    • Post Points: 20
  • Thu, Sep 13 2012 11:36 PM

    • JuergenWeber
    • Not Ranked
    • Joined on Thu, Feb 16 2012
    • Nuernberg, Bavaria
    • Posts 15
    • Points 255
    Re: Adding a new menu item to Allegro PCB Editor Reply

    Hi,

    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 appear
    under appropriate component categories such as Power, Ground, Ports, Taps, and Page Borders.This information, by
    default, 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

     

    Jürgen

     

     

     

    Juergen Weber GCD Printlayout GmbH 91056 Erlangen Germany
    • Post Points: 20
  • Fri, Sep 14 2012 8:07 AM

    • chads108
    • Top 50 Contributor
    • Joined on Thu, Mar 29 2012
    • Plano, TX
    • Posts 162
    • Points 2,755
    Re: Adding a new menu item to Allegro PCB Editor Reply

    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.

    Chad

    • Post Points: 20
  • Mon, Sep 17 2012 3:20 AM

    • JuergenWeber
    • Not Ranked
    • Joined on Thu, Feb 16 2012
    • Nuernberg, Bavaria
    • Posts 15
    • Points 255
    Re: Adding a new menu item to Allegro PCB Editor Reply

    Thank you Chad,

    now works all fine :-)

     

    Best Regards

    Jürgen

    Juergen Weber GCD Printlayout GmbH 91056 Erlangen Germany
    • Post Points: 5
Page 1 of 2 (24 items) 1 2 Next >
Sort Posts:
Started by chads108 at 01 Aug 2012 07:26 AM. Topic has 23 replies.