Quantcast
Channel: Cadence PCB Design Forum
Viewing all articles
Browse latest Browse all 5525

Help to add a menu item before a separator

$
0
0

I used to use a simple SKILL program that reads in the default allegro.men file from each base release, performs my company customizations, and then reads out the modified file. It worked pretty well and just needed tweaking after each base release was pushed.

With the new release, err, cadence starting with 16.6, the menus are changing fast. When the axlUIMenu* functions were first released they seemed to be borked pretty hard, but I hope they're mature since that seems to be the only reasonable way to go to. (Admittedly, it is far more powerful and I'm anxious to get this working for future maintainability.)

OK, to get started so I wrote a regular prodcedure and called it in allegro.ilint using axlUIMenuRegister commands. Easy as pie. I can get new menu items to pop in above (and only above!) existing menu items.

For example, note that axlUIMenuRegister("save_as" '((Write "write"))) adds "Write" before "Save As...". 

However, I want to add some items before a separator. I don't see any way to uniquely identify a separator in a particular menu, so what to do? Well, since axlUIMenuFind() seems to return an integer, maybe I can just call that and then increment the return value. Nope. Wrapping wrapping axlUIMenuFind() with add1() makes the resulting axlUIMenuInsert() do nothing. 

I see that axlUIMenuInsert(axlUIMenuFind(nil "save_as") "Write" "write") also adds "Write" before "Save As..." if I use axlTrigger() to modify the menu. This also gives me the power to delete menu items, which was easy enough to get working. But I still can't figure out how to add a new item before a menu separator. To take the above example to the next level, how can I add "Write" *after*"Save As..."? There must be a way, right?


Viewing all articles
Browse latest Browse all 5525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>