Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Deleting datalinks

2 REPLIES 2
Reply
Message 1 of 3
etilley327KA
203 Views, 2 Replies

Deleting datalinks

I'm looking for a way to delete all the datalinks at once from a drawing without exiting. I've got this, but it's not working, I keep getting object is referenced by other objects.

 

(defun c:dfg (/ data)
(if (setq data (dictsearch (namedobjdict) "ACAD_DATALINK"))
  (vla-delete (vlax-ename->vla-object (cdr (assoc -1 data))))
)  
)
2 REPLIES 2
Message 2 of 3
paullimapa
in reply to: etilley327KA

perhaps try this solution found by doing a searh on-line:

How to completely delete a table data link - AutoCAD Drawing Management & Output - AutoCAD Forums (c...

(dictremove (namedobjdict) "ACAD_DATALINK")

then save and close the drawing, reload drawing 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 3
etilley327KA
in reply to: paullimapa

Yes, ive seen that and used it, but im looking for a way to do it without closing the drawing.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report