Removing Multiple Missing Data Links

Removing Multiple Missing Data Links

jallen_cph
Contributor Contributor
1,184 Views
5 Replies
Message 1 of 6

Removing Multiple Missing Data Links

jallen_cph
Contributor
Contributor

I regularly receive files from a surveyor that have well over 150 broken Excel data links. That number grows with each file they send me. Selecting objects in these files causes AutoCAD to hang for several seconds before registering the selection, unless I remove all of the data links. I CAN go in to the Data Link Manager and manually delete each data link, so there doesn't seem to be any objects using them. One I do that I don't have any selection issues. The problem is that that process takes a looooong time. I've asked my client to reach out to the surveyor to see if they can clean up their files, but so far no response from them. 

 

From googling the problem I've tried:

  • Audit / purge - All broken data links still present.
  • Wblocking out the linework and copy/paste. Brings the broken data links with it.
  • I found a thread on the forums here that had a LISP routine called DICTEDIT that was supposedly a solution, but it also requires you to select each link and confirm the deletion individually and takes even longer to delete them all.

 

Unfortunately, just using a different surveyor is out of the question: my client's client uses them exclusively (I'm 4th party here).  Is there any way possible to get rid of all of these in one operation? I currently have 14 surveys that each have 150+ missing data links. 

0 Likes
Accepted solutions (1)
1,185 Views
5 Replies
Replies (5)
Message 2 of 6

ВeekeeCZ
Consultant
Consultant

If you post some sample dwg to test on, possibly the routine you mentioned above, I could look at what could be done.

Do you want to remove all of them (possibly simpler) or just those missing ones?

0 Likes
Message 3 of 6

jallen_cph
Contributor
Contributor

One of the survey files is attached along with the LISP. The LISP routine came from this thread from a few years ago on the same issue: https://forums.autodesk.com/t5/autocad-forum/delete-multiple-datalinks-from-a-drawing/td-p/7368398

 

They are all missing, so I'd like to remove them all if possible. 

0 Likes
Message 4 of 6

ВeekeeCZ
Consultant
Consultant
Accepted solution

This simple lisp does work?

 

(defun c:DataLinkDelete nil (dictremove (namedobjdict) "ACAD_DATALINK") (princ))

 

Message 5 of 6

JTBWorld
Advisor
Advisor

Our JTB FixRefs app can be used for this purpose. 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

0 Likes
Message 6 of 6

jallen_cph
Contributor
Contributor

YES!!! That worked perfectly! Thank you! You have no idea how much time you just saved me. 

0 Likes