Hints, Tips and Solutions

 

Volume 12, Number 3, March 2002

A simple way to add custom commands to Expert's menu is implemented. It is possible to add menu items that execute xi-commands or procedures.

To do this, you must put a file named 'custom.mnu' with syntax described below into Expert's executable directory and start (or restart) Expert.

Below is an example custom.nmu file. This file may be found in the "Examples>>Expert" folder of the CELEBRITY installation.

-------------------------------------------------------------

10 > Deb&ug New &Box = box 0 0 100 100; zoom;

-----------

Get &point = get_point();

> &Extra

&Wordpad = spawn("C:/WinNT/notepad.exe") /nowait;

Wordpad &2 = spawn("C:/WinNT/notepad.exe");

-----------

&Box big = box 0 0 1000 1000; zoom;

> &Point

Get &point = get_point();

&Box3 = box 10 10 100 100; zoom;

<

<

&Two Boxes = box 0 0 100 100; box 50 50 100 100; zoom;

<

11 > C&ustom

&Box = box 0 0 100 100; zoom;

-----------

Get &point = get_point();

< 12 > Test1

&Pmos = layer P-Act; box -2 -1 5 3; layer Poly; box -0.5 -2 2 5;

Pmos&2 = box -2 -1 5 3 /layer="P-Act"; box -0.5 -2 2 5 /layer="Poly";

Pmos&3 = box;

<

-------------------------------------------------------------

Syntax: The syntax will be explained using the previous example.

"10", "11", "12"" are the positions in Expert's main menu for new submenus.

The > character marks the beginning of a submenu.

The < character marks the end of a submenu.

As you can see, submenus may be nested.

"Debu&g" shows how to define the name (Debug) of a submenu and its hotkey (G).

"New &Box = box 0 0 100 100; zoom;" This line defines a submenu command. Here, as above, "New &Box" defines the name and the hotkey for the command. It is separated from the actual command by the equal sign. You may put here several xi-commands separated by semicolon, as in:

&Box3 = box 10 10 100 100; zoom;

The line

&Wordpad = spawn("C:/WinNT/notepad.exe") /nowait;

is an example of calling other Windows programs from Expert.

More advanced customization of Expert's User Interface and functionality is possible via Expert API.

 

 

Call for Questions

If you have hints, tips, solutions or questions to contribute, please contact our Applications and Support Department
Phone: (408) 567-1000 Fax: (408) 496-6080
email: support@silvaco.com