CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.096.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.

CAD tip CAD tip # 10647:

Question

CAD 
 %  platform  category 
A
As it is known, in AutoCAD (with VBA Enabler) it is possible to save DWG files and then execute macros in VBA language.

But with the freeware application CADstudio AutoExec you can also store LISP macros (in AutoLISP or VisualLISP, including .lsp, .fas, .vlx files) directly inside DWG drawings. With the module (enabler) AutoExec.vlx loaded, you can then you can automatically load and execute macros stored in opened DWG files on other computers without having to worry about the individual LSP/VLX files. You can define new commands and functions tied to a specific drawing (or DWT template). Note: The LISP function is only loaded by default. If you also want to automatically execute a specific function or command, add it to the Exec field.

The command AUTOEXEC displays a list of macros available in the drawing ("*" indicates my own macros). You can load another macro (LSP/VLX file) with the Load function.

For security reasons it is possible to limit the loading of such macros only to those macros that have been saved by the same user ("signed"). In higher versions of AutoCAD it may be necessary to confirm the security of individual loaded LSP and VLX files.

Remember that for AutoExec macros to be loaded automatically, the AutoExec.vlx module must be loaded in every AutoCAD session (e.g. using autoload, the briefcase icon in APPLOAD).

More on AutoExec
ACADACADMPlantCivil3DACADE
100% *CAD
1.1.2025    12619×  

See also:
Tip 14359:Automatic macro execution when opening a CAD file (AutoCAD, Inventor, Max, PowerMill)
Tip 10663:Automatic warning on DWG open.


Back    All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  



Featuring:
Export 3D VRML scenes from AutoCAD and Inventor
VRMLout More info


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist