AutoCAD Startup LISP Routine: DATALINKUPDATE

StartupLISPRoutine-DATALINKUPDATE.jpg

If you are associating an external data source (Excel, CSV) to your CAD content, including DATALINKUPDATE in your program's startup routine saves time and reduces the chances that your data is outdated and not being updated in your documents.

 

AutoCAD has a notification pop-up in the Status Bar, which will notify you that your external datalink file has been updated. You would typically need to update this manually.

kristinayoungblut_0-1658439812463.png

This feature will perform on the OPENING of a file. If the data link is updated with an open file, you will receive the above notification and can manually update the file for alterations during development.

 

1. Starting a LISP Routine from scratch

If you are creating this file from scratch, it will require the syntax to match the following:

(DEFUN S::STARTUP ()
(COMMAND "<variable name>" "<setting>")

;(COMMAND "<variable name>" "<setting>") - If you have more than one command

;(COMMAND "<variable name>" "<setting>") - and so on... and so on...
)

The user-defined functions will vary depending on the action and routine you want to write and run. We are creating a Startup Function.

Now to apply our function and requirements. _u stands for "Update Data Link" this will force the file to check its external resource and update to match automatically.

(DEFUN S::STARTUP ()
(COMMAND "DATALINKUPDATE" "_u")
)

 

View this resource from Autodesk Learning Blog to load LISP into your system.

 

2. Already have a LISP 

If you already have a startup LISP routine that you use, add this to a new row:

(COMMAND "DATALINKUPDATE" "_u")

 

To customize Startup routines, I suggest making a LISP file specific to your needs. I find this helpful in collaborating with teams, setting up a new computer, or sharing knowledge with others.

 

Helpful Links:

AutoCAD Support and Learning - How to automatically load LISP routines in AutoCAD

AutoCAD Support and Learning - DATALINKUPDATE (Command)

S::STARTUP Function: Postinitialization Execution

5 Comments