Back HomeBack to DocumentsBack to D-I-E-S-E-LYou are here
Some useful DIESEL macros

This page is outdated and no longer part of our regular homepage.
It has been kept alive just in case external links still point to it. It will be removed soon.
Please visit instead our main page at

Some useful DIESEL macros

VG-Wort Access-ZählmarkeYou may add talking menu labels to your pull-down menus. Then you can easily see the necessary settings without having to call the appropiate commands. Here's an example:

[$(eval,Fillet radius <$(rtos,$(getvar,filletrad))>)]+

System variables which only have an on/off setting, may display a checkmark to show the current value. This macro combines two settings:

[$(if,$(getvar,snapmode),!.)Snap spacing <$(rtos,$(index,0,$(getvar,snapunit))),$(rtos,$(index,1,$(getvar,snapunit)))>]+

An if statement in the macro code can be used to change a variable from on to off and vice versa:


Often menu macros should act differently depending on the active command. The CMDNAMES variable can be used to detect the running command, if any. This macro checks whether any command is active. If not, it turns the running osnap off. If a command is active, the running osnap is overwritten by "none" for the next input only:

[OSnap off]+

In a similar way you can turn on or override any running object snap mode. Use the and and xor functions to evaluate the OSMODE system variable:

[$(if,$(and,1,$(getvar,osmode)),!.)Endpoint snap]+
[$(if,$(and,2,$(getvar,osmode)),!.)Midpoint snap]+
[$(if,$(and,4,$(getvar,osmode)),!.)Center snap]+

This is a shareware document. What is a shareware document? Did this article help you earn some money? Then give something back! Help creating shareware documents by donating something to the author:

Contact CR/LF GmbH

© 2000-2011 by CR/LF GmbH, Essen/Germany. All rights reserved.
No part of this document may be reproduced or published without written consent by CR/LF GmbH.
Last modification: 01.04.2011