Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

mliuMGKLT
243 Vistas, 2 Respuestas

Removing all Xrefs

I am trying to remove all xrefs from my file. I setup a shortcut so that when I press it, it runs the following command

("-xref" "deatch" "*")

but when it runs it tells me there is "no matching xref names found" and doesn't remove any of the xrefs. Am I doing something wrong? Any help appreciated.

dmfrazier
en respuesta a: mliuMGKLT


@mliuMGKLT wrote:

I am trying to remove all xrefs from my file. I setup a shortcut so that when I press it, it runs the following command

("-xref" "deatch" "*")

but when it runs it tells me there is "no matching xref names found" and doesn't remove any of the xrefs. Am I doing something wrong? Any help appreciated.


I'm surprised the code works at all. (Perhaps the typo doesn't exist in what you're actually running.)

In any case, when I run it (corrected), I get this error: ; error: bad function: "-xref".

If I use the command function instead (command "-xref" "detach" "*") on a DWG that has no Xref, I get the "no matching Xref.." response.

However, if I run it on a DWG that has an attached Xref, it works (returns "nil" and detaches the Xref).

mliuMGKLT
en respuesta a: dmfrazier

Sorry, was typing fast and accidentally made a typo. I figured out my problem. Command was running successfully, like you said. I just didn't realize it was since it wasn't removing everything. The stuff left weren't .dwg files so the command wasn't removing them. Have to find another method for autocad to remove it.