by Vladimir Michl
AutoCAD
AutoCAD supports several options how to auto-load and auto-start macros, e.g. LISP macros in .LSP and .VLX files e.g.:
- Adding them to ACADDOC.LSP or ACADLTDOC.LSP (for AutoCAD LT)
- Using CUIx ribbon files and MNL files
- Dragging them over the briefcase icon in the APPLOAD dialog
- Defining the LISP function S::STARTUP
- Using VBA modules or VBA macros embedded in DWG files
Additionally, LISP macros (LSP, VLX, FAS) stored within DWG files can be executed using the AutoExec utility. For more details, refer to the Tip 10647 on CADforum.eu.
Inventor
iLogic macros in Autodesk Inventor can be embedded directly within design files such as IPT, IAM, or IDW. To enable automatic execution when the specific document is opened, configure an Event Trigger that activates the macro upon "After Open Document" (see the Manage tab).
3ds Max
In Autodesk 3ds Max, you can execute MaxScript macros using the AutoExec utility (by Martin Breidt) - see scripts.breidt.net - this tool will help you to nsert MaxScript code into your scene files.
PowerMill
In the CAM software Autodesk PowerMill, you can use the predefined file pmuser.mac to automatically execute the requested macro.
Revit and Fusion
There is no such direct mechanism for Revit, Fusion or Dynamo. In Revit you could use the Module_Startup module in the API, in Fusion you can load and execute Python code defined as an add-on script. The rule of thumb for such actions is to limit any automated activities to simple, non-destructive operations.
Comentários (0 comentários)