About AutoLISP Compatibility

AutoLISP programs commonly require very few changes in order to run on the latest release.

However, an AutoLISP program might no longer run correctly on the latest release because an AutoLISP function, or AutoCAD-based product command or system variable has been changed or deprecated.

Note: Starting with AutoCAD 2014-based products, custom applications must work under secure mode; when the SECURELOAD system variable is set to 1 or 2. When operating under secure mode, the AutoCAD-based product is restricted to loading and executing files that contain code from trusted locations; trusted locations are specified by the TRUSTEDPATHS system variable. For more information, see "About Security and Protecting Against Viruses."

General Information

Obsolete Commands and System Variables

Review your custom programs for commands and system variables that have been designated as obsolete. In some cases, an obsolete command or system variable can still be used by your custom programs even though it cannot be entered directly at the Command prompt or accessed from the user interface.

Note: Even though an obsolete command or system variable might still work for a custom program, there is no guarantee that it will continue to work in a future release of the product. It is recommended to rewrite your custom programs to avoid the use of any obsolete commands or system variables.

The following techniques might be useful in trying to use an obsolete command or system variable in a custom program:

  • Prefix a command name with a period. For example, .BLIPMODE allows for the use of the BLIPMODE command.
  • Avoid executing an obsolete system variable with the COMMAND function which might result in an Unknown Command error message; instead, use the GETVAR and SETVAR functions. For example, (getvar "BLIPMODE") returns the current value of the BLIPMODE system variable.
Note: Commands and system variables that have been removed from the product cannot be restored using the previously mentioned techniques.

AutoCAD 2017 and Later

CDATE, DATE, and other Date\Time Related System Variables

Starting with AutoCAD 2017-based products, the values stored in the CDATE and DATE system variables no longer represent the current date\time down to the nearest millisecond or one-hundredth of a second. Seconds are now the smallest unit of time in which the values of these two system variables are expressed. If you need to track time intervals smaller than one second, consider using the value returned by the MILLISECS system variable which stores the difference in time since the workstation was booted in milliseconds.

The following date\time related system variables were also affected by the removal of milliseconds:

  • TDCREATE
  • TDINDWG
  • TDUCREATE
  • TDUPDATE
  • TDUSRTIMER
  • TDUUPDATE

AutoCAD 2016 and Later

Digitally Signed Files

Starting with AutoCAD 2016-based products, AutoLISP files can be digitally signed. Digitally signing an AutoLISP file allows it to be loaded into the AutoCAD drawing environment without warning the user that the file isn't trusted. VLX files that are digitally signed cannot be loaded into AutoCAD 2015-based or earlier products.

osnap Function

Starting with AutoCAD 2016-based products, the osnap function no longer supports the Quick (qui) Object Snap mode. Remove the qui mode from the statements that use the osnap functions in your AutoLISP programs. If the mode is not removed, the osnap function returns nil instead of a coordinate value for a valid point in the drawing area.