Jump to content

Lisp needed for removing datalinks from the xref list


Tommy78

Recommended Posts

Hi,

 

I was experimenting with datalinks and when i finished i found a couple of references in the xreflist to said datalinks (.dxe) files.

I tried everything to get rid of them but this is seemingly impossible!

Link to comment
Share on other sites

Please try, i did minimal testing:

 

rename the dxe file so that it will be not found then save drawing.

Copy and Paste this to commandline then press enter, save drawing then reopen again

 

(dictremove (namedobjdict) "ACAD_DATALINK")
Link to comment
Share on other sites

  • 2 years later...

I've got this dxe issue with our dwgs. The datalink files are not availablethus I have dozens of dxe links in the XREF manager that I'd like to get rid of.I've tried this code but what it does is remove the data dictionary entirely, butit did not remove the dxe's. I've tried the dictedit.lsp, and it works (so faras in it runs properly), but it doesn't list any of the dxe's. It did list afew datalinks, but not the ones of course I need to remove. I tried thedxedel.vlx from the cadstudio.cz site, but all it did was wipe out the gooddatalinks. So I'm still looking for a way to purge these damn dxe links fromour dwgs. Any other suggestions? Again, none of these attached dxe ghosts showup in the dictionary edit. "What" is causing the XREF manager to listthese files? It's obviously reading these dxe links from somewhere? I'll keeplooking...thx.

Please try, idid minimal testing:

 

rename the dxe file so that it will be not found then save drawing.

Copy and Paste this to commandline then press enter, save drawing then reopenagain

 

(dictremove (namedobjdict)"ACAD_DATALINK")

Link to comment
Share on other sites

  • 6 years later...

Hello there, I will zombiefy a thread again: does anybody know how to run this line within script

(dictremove (namedobjdict) "ACAD_DATALINK")

and make it effective in the same drawing session?

Ther result is visible after save, close and reopen the drawing. Won't work in a script this way...

 

Link to comment
Share on other sites

Try this:

(if (setq e (dictsearch (namedobjdict) "ACAD_DATALINK"))
  (vla-delete (vlax-ename->vla-object (cdr (assoc -1 e))))
)

 

  • Like 3
Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...