03.01.2013 Views

Customization Guide (.pdf) - Documentation & Online Help - Autodesk

Customization Guide (.pdf) - Documentation & Online Help - Autodesk

Customization Guide (.pdf) - Documentation & Online Help - Autodesk

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

You cannot use trailing spaces in a menu label to increase the menu width,<br />

because trailing spaces are ignored while the menu is being loaded. Any spaces<br />

you use to increase the width of a menu label must be within a DIESEL<br />

expression.<br />

The next example uses the same DIESEL expression as the label and a portion<br />

of the menu item. It provides a practical way to enter the current day and<br />

date into a drawing.<br />

$(edtime,$(getvar,date),DDD", "D MON YYYY)^C^Ctext +<br />

\\\ $M=$(edtime,$(getvar,date),DDD", "D MON YYYY);<br />

Also, you can use a DIESEL macro to mark pull-down menu labels or make<br />

them unavailable. The following pull-down menu label displays an unavailable<br />

ERASE while a command is active. The text is displayed normally when a<br />

command is not active.<br />

$(if,$(getvar,cmdactive),~)ERASE<br />

You can use a similar approach to place a mark beside a pull-down menu item<br />

or to interactively change the character used for the mark.<br />

You can use the CLIPBOARD system variable to enable or disable Clipboard<br />

commands on your menu. For example, the following DIESEL expression<br />

disables the Paste Special menu item when the Clipboard is empty:<br />

$(If,$(getvar, clipboard),,~)/Paste &Special...<br />

^C^C_pastespec<br />

Quick Reference<br />

System Variables<br />

CLIPBOARD<br />

Indicates the status of the Clipboard.<br />

MENUECHO<br />

Sets menu echo and prompt control bits.<br />

USERNAME<br />

330 | Chapter 5 DIESEL<br />

Specifies the user name.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!