System Variables

Parent Previous Next

System Variables


There are many system variables which can affect the performance of running Lisp code ... many are already well-known, some are less known to have performance impact. So it is useful to set specific system variables to defined state to improve performance and to prevent side-effects.

CMDECHO

set as 0
does not only suppress unwanted output to commandline; many commands format a prompt string which is finally not used (string processing is rather slow)

OSMODE

set as 0
calculating snap points can be slow, and snapping is mostly unwanted during Lisp runtime;
any point input by (command) or (vl-cmdf) is fully processed by object snapping !

DRAGMODE

set as 0
suppresses generation of temporary drag graphics for several commands

PICKSTYLE

set as 0
(unless you explicitly want the group entities to be included)
disable group + associative hatch selection during entity selection;
this is most important :
if a drawing has groups, all group entities are verified against entities in primary selectionset;
this can be very costly when a drawing has many groups and/or the primary selectionset

HIGHLIGHT

set as 0
to disable highlighting of objects when using (command)

UCSICON

set as 0
disable ucsicon display while Lisp code is running (reduces flickering, and updating temp. graphics is not fast)

UCSFOLLOW

set as 0
to prevent the actual view from following any ucs change (keeps redraw times small)

UCSDETECT

set as 0
prevent dynamic ucs changes, usually unwanted while Lisp code runs

AUTOSNAP

set as 0
disable any visual effects related to snapping (markers, tooltips, magnets etc.)

BLIPMODE

set as 0
do not draw temporary point markers

LOGFILEMODE

set as 0
disables recording of operations to logfile

REGENMODE

set as 0
turns off automatic regeneration triggered by several commands

SOLIDCHECK

set as 0
reduce any potential overhead when creating + modifying ACIS objects

SNAPMODE

set as 0
disable cursor snapping to reduce internal processing of input points

SELECTIONPREVIEW

set as 0
disable highlighting of entities


Of course, the majority of these system variables are effective in combinations with (command) only, not with API calls.
Nevertheless, it is a good habit to set desired system variables and restore them,
When the Lisp program switches to interactive user-input / operations, any changed system variables should be switched back to previous or appropriate settings.


Changing System Variables


System variables are often changed by (command "<sysvar-name") as each system variable is also available as a command name.

Highly recommended : never use (command "<sysvar-name") to change system variables - always use (setvar ""<sysvar-name" value) instead.

Execution of (command) is relatively slow, it has several side-effects which cost performance, like triggered command reactors, implied GUI updates, error status can not be retrieved and so on.




©  Menhirs NV. All rights reserved.