PDA

View Full Version : Detaching xrefs - "Unable to detach. Multiple references detected"



amasella
2006-01-31, 04:53 PM
I am trying to detach a xref
and got this message.
"UNABLE TO DETACH. MULTIPLE REFERENCES DETECTED"
Does anyone know what causes this?

Opie
2006-01-31, 05:29 PM
Have you copied any of the reference files while in the drawing? I believe you would need to remove the duplicate references before being able to detach the xrefs.

Maverick91
2006-01-31, 05:47 PM
Have you copied any of the reference files while in the drawing? I believe you would need to remove the duplicate references before being able to detach the xrefs.what he means is erase the xrefs. then you can detach.

amasella
2006-01-31, 06:12 PM
Would this happen if the xref was used in another drawing?

Wanderer
2006-01-31, 06:58 PM
Would this happen if the xref was used in another drawing?that shouldn't affect it at all, unless a file referenced into the drawing has been referenced into another file which you have ref'd into the current drawing.

Maverick91
2006-01-31, 07:38 PM
that shouldn't affect it at all, unless a file referenced into the drawing has been referenced into another file which you have ref'd into the current drawing.nested references can sure get complicated -- especially depending on overlay or attached references :screwy:

Wanderer
2006-01-31, 07:40 PM
nested references can sure get complicated -- especially depending on overlay or attached references :screwy:I understood it perfectly... well... until I just wrote that previous post... lol... it's nearly impossible to talk about without a detailed diagram in hand. ;)

Opie
2006-01-31, 07:54 PM
what he means is erase the xrefs. then you can detach.
I didn't think my reply was that complicated. You understood it. :p

Maverick91
2006-01-31, 08:22 PM
I didn't think my reply was that complicated. You understood it. :pyour point?

kennet.sjoberg
2006-01-31, 10:51 PM
I am trying to detach a xref
and got this message.
"UNABLE TO DETACH. MULTIPLE REFERENCES DETECTED"
Does anyone know what causes this?

Let say that you have 2 xrefs attached to your model, Xref1 and Xref2
if Xref2 has Xref1 attached and you try to detach Xref1 you get the message.

model
|____Xref1
|____Xref2---Xref1

you have to detach Xref 1 from Xref2
and then detach Xref1 from model.

: ) Happy Computing !

kennet

jaberwok
2006-01-31, 11:20 PM
Swithching the Xref Manager into Tree mode will make it easier to see where the problems are.

Mike.Perry
2006-02-01, 03:09 AM
Hi

Check out the following Technical Document on the Autodesk web site under the Knowledge Base section -

ID: TS63870 - Error when attempting to detach external reference: Unable to detach multiple references (http://usa.autodesk.com/adsk/servlet/ps/item?id=2881597&linkID=2475323&siteID=123112)

Have a good one, Mike

amasella
2010-05-04, 01:43 PM
I can not detach xref

Error message states:

has multiple references. Not detached.

I have erased the xref and still can not detach

scott.wilcox
2010-05-04, 01:52 PM
The XRef is probably copied somewhere in your drawing, perhaps in a different layout tab.

When there is only one instance of an XRef in your drawing, you should be able to detach it.

Mamma Jamma
2010-05-04, 02:08 PM
I just did a test with an xref inserted and copied multiple times. Detached just fine, as did the tiff that was inserted inside of it. I don't think that's the problem, but it might be related to having one xref nested within multiple other xrefs, as well as directly into the current drawing. If you detach (or change to overlay) the xrefs in the other references, you should be able to detach it from your drawing.

jaberwok
2010-05-04, 04:09 PM
If you switch to tree-view (one of two buttons at top-right in recent versions), it will be easier to see where your xref is attached, especially if it is nested.

amasella
2010-05-04, 05:42 PM
I erased the xref and inserted the xref. but when I try to attach the xref back in.
I get an error message: "is already a standard block in the current drawing"

Opie
2010-05-04, 06:05 PM
Before trying to place it in again, you could try purging that block name.

Mamma Jamma
2010-05-04, 06:10 PM
Before trying to place it in again, you could try purging that block name.
If, for some reason, it won't Purge, try Renaming it.

amasella
2010-05-04, 06:55 PM
it will not purge,then I re-insert the block and erased it then tried to purge it again no luck

Opie
2010-05-04, 06:58 PM
Have you tried making a selection of said block / xref using qselect? You can also use the filter command, but it is a bit more archaic.

amasella
2010-05-04, 07:19 PM
no luck not purging

Opie
2010-05-04, 07:28 PM
no luck not purging
Did a selection set get created with the qselect or filter command? You will need to remove the offending block(s) / xref(s) before you can purge it.

michael.12445
2010-05-04, 08:36 PM
There's another discussion about this in this thread (http://forums.augi.com/showthread.php?t=117592). If you think you've erased all instances of the xref, try typing this at the Command: prompt -

(setq a (ssget "X" '( ( 0 . "insert" ) ( 2 . "xrefname" ) ) ))

substituting the name of the xref in question for xrefname in the above (it must be in double quotes as shown). If AutoCAD says "nil," then there truly are no instances still in the drawing, but if it says "selection set xxxx," then there is at least one instance still attached. (You can then type (sslength a) to see how many.) If there are still instances of the xref in the drawing but you can't see anything to select, then start looking for off or frozen layers, zoom extents in model space, switch to each paper space layout in turn and zoom extents, and finally, try deleting any xclip boundaries that may have excluded all visible xref geometry.

Good luck.

irneb
2010-05-05, 12:39 PM
(setq a (ssget "X" '( ( 0 . "insert" ) ( 2 . "xrefname" ) ) ))

substituting the name of the xref in question for xrefname in the above (it must be in double quotes as shown). If AutoCAD says "nil," then there truly are no instances still in the drawing, Not entirely true. It only means that there's no copies directly placed in either the Model Space or one of the tabs in the current drawing. You could have a copy of the xref nested inside another xref, or inside another block. Neither of these 2 scenarios would show up with this code.

To check if it's inside another xref, follow Opie's suggestion of showing the treeview in the XRef Manager.

To check if it's inside a block is a lot more difficult: you'll need to open each block in turn, select all (Ctrl+A) and use quick select to filter for its name. Other wise you could use this lisp:
(defun c:FindBlocks (/ BName blk en ed lst ss)
(setq BName (strcase (getstring "What's the block's name?: "))) ;Ask user for block to search
(setq ss (ssget "X" (list '(0 . "INSERT") (cons 2 BName))))
(setq blk (tblnext "BLOCK" t)) ;Get the data of the 1st block definition
(while blk ;While a block's definition is still available
(setq en (cdr (assoc -2 blk))) ;Get the 1st entity inside the block
(while en ;While there's an entity inside found
(setq ed (entget en)) ;Get its data
(if (and (wcmatch (cdr (assoc 0 ed)) "INSERT") ;Check if it's a block reference, and
(wcmatch (strcase (cdr (assoc 2 ed))) BName) ;Equal to the name to be searched
) ;_ end of and
(setq lst (cons (cdr (assoc 2 blk)) lst)) ;Add the containing block's name to the list
) ;_ end of if
(setq en (entnext en)) ;Get next entity
) ;_ end of while
(setq blk (tblnext "BLOCK")) ;Get the data of the next block definition
) ;_ end of while

(if ss
(princ (strcat "\nThere are " (itoa (sslength ss)) " copies of " BName " in the drawing."))
(princ (strcat "\nThere are no copies of " BName " in the drawing."))
)
(princ (strcat "\nThe following is a list of containing blocks, in which " BName " is nested:"))
(foreach en lst ;Step through the list
(princ (strcat "\n" en))
)
(princ)
) ;_ end of defun

amasella
2010-05-05, 12:55 PM
I tried: (setq a (ssget "X" '( ( 0 . "insert" ) ( 2 . "xrefname" ) ) ))

and got this: (("_>

irneb
2010-05-05, 01:06 PM
I tried: (setq a (ssget "X" '( ( 0 . "insert" ) ( 2 . "xrefname" ) ) ))

and got this: (("_>That just means the lisp is incomplete, it still needs 2 closing parentheses. Are you sure you typed the line correctly (including all 4 closing parentheses)?

amasella
2010-05-05, 01:10 PM
I got it detached by inserting rather than attaching the xref and then erasing it but can not re-xref it in getting the error message:

is already a standard block in the current drawing.
*Invalid*

it will not purge

amasella
2010-05-05, 01:21 PM
I copied and pasted the lisp sting and got this:

<Selection set: 3595>

Opie
2010-05-05, 01:22 PM
I got it detached by inserting rather than attaching the xref and then erasing it but can not re-xref it in getting the error message:

is already a standard block in the current drawing.
*Invalid*

it will not purge
Can you post the drawing here and specify which xref is the problem?

Opie
2010-05-05, 01:24 PM
I copied and pasted the lisp sting and got this:

<Selection set: 3595>
To get the number of items in that selection set, use:

(sslength a)
To delete the items in that selections set, use:

(command "erase" a "")

amasella
2010-05-05, 03:01 PM
how do I use this lisp

Opie
2010-05-05, 03:03 PM
how do I use this lisp
Copy and paste to the command line.

Can you post the offending drawing?

amasella
2010-05-05, 03:05 PM
I can do that

amasella
2010-05-05, 03:08 PM
this is what I copied and pasted and end up with

Command: (defun c:FindBlocks (/ BName blk en ed lst ss)
(_> (setq BName (strcase (getstring "What's the block's name?: "))) ;Ask user
for block to search
(_> (setq ss (ssget "X" (list '(0 . "INSERT") (cons 2 BName))))
(_> (setq blk (tblnext "BLOCK" t)) ;Get the data of the 1st block definition
(_> (while blk ;While a block's definition is still available
((_> (setq en (cdr (assoc -2 blk))) ;Get the 1st entity inside the block
((_> (while en ;While there's an entity inside found
(((_> (setq ed (entget en)) ;Get its data
(((_> (if (and (wcmatch (cdr (assoc 0 ed)) "INSERT") ;Check if it's a
block reference, and
(((((_> (wcmatch (strcase (cdr (assoc 2 ed))) BName) ;Equal to
the name to be searched
(((((_> ) ;_ end of and
((((_> (setq lst (cons (cdr (assoc 2 blk)) lst)) ;Add the containing
block's name to the list
((((_> ) ;_ end of if
(((_> (setq en (entnext en)) ;Get next entity
(((_> ) ;_ end of while
((_> (setq blk (tblnext "BLOCK")) ;Get the data of the next block definition
((_> ) ;_ end of while
(_>
(_> (if ss
((_> (princ (strcat "\nThere are " (itoa (sslength ss)) " copies of " BName
" in the drawing."))
((_> (princ (strcat "\nThere are no copies of " BName " in the drawing."))
((_> )
(_> (princ (strcat "\nThe following is a list of containing blocks, in which
" BName " is nested:"))
(_> (foreach en lst ;Step through the list
((_> (princ (strcat "\n" en))
((_> )
(_> (princ)
(_> ) ;_ end of defun
C:FINDBLOCKS

Opie
2010-05-05, 03:20 PM
Now, type FINDBLOCKS to execute that command. Then, follow the prompts.

amasella
2010-05-05, 06:31 PM
This is what my results got after entering FINDBLOCKS at the command line

Command: findblocks
What's the block's name?: mapindex

There are 1 copies of MAPINDEX in the drawing.
The following is a list of containing blocks, in which MAPINDEX is nested:

Command:

irneb
2010-05-06, 05:07 AM
That tells me that you've got 1 copy of the xref in either the Model Space or one of the tabs. It should thus be possible to detach it through XRef Manager. If not then there's 2 possibilities:

The copy of the xref is placed on a locked layer.
It also forms part of another XRef - thus try the treeview. See the attached screen capture showing one of my drawings, notice the CORE xref is both attached directly as well as nested through another.

amasella
2010-05-06, 01:05 PM
The xref is detached and I tried to reattach and got this message.
** Error: "mapindex" is already a standard block in the current drawing.
*Invalid*


Then I inserted this block, exploded it and erased it then tried to purge and it wasn't listed for purging. I assume the block is still somewhere in the dwg. Is there a way of finding it and/or deleting the block

ccowgill
2010-05-06, 01:18 PM
The xref is detached and I tried to reattach and got this message.
** Error: "mapindex" is already a standard block in the current drawing.
*Invalid*


Then I inserted this block, exploded it and erased it then tried to purge and it wasn't listed for purging. I assume the block is still somewhere in the dwg. Is there a way of finding it and/or deleting the block
what about using the rename command to rename the existing occurrences something else, to allow you to insert the xref? It isnt a solution, but it is a work around (as obviously you probably want to find where all existing occurrences are and get rid of them.)

irneb
2010-05-06, 01:38 PM
The xref is detached and I tried to reattach and got this message.
** Error: "mapindex" is already a standard block in the current drawing.
*Invalid*

Then I inserted this block, exploded it and erased it then tried to purge and it wasn't listed for purging. I assume the block is still somewhere in the dwg. Is there a way of finding it and/or deleting the blockIf you don't want to rename it first (REN command), you should be able to use micheal's suggestion to be able to find the occurrence, then Opie's post to erase that occurrence. Or you could have used the FILTER / QSELECT commands to accomplish the same.

If none of these work and you can still not purge the block, then use my lisp to find in which block it's been nested. Then BEdit that containing block and use FILTER / QSELECT if you don't see it directly. Erase. BCLOSE & Yes to save. Repeat for any other occurrences.

If you still have this same problem, then there's some sort of error or the block is used within a style (e.g. dimtick) / table (inserted in cell). Could you please attach the DWG to a post? Or if you don't want to share it to everyone, PM one of us.

amasella
2010-05-06, 01:53 PM
Yea I can rename them and reattach the xref, but the existing block is still hanging in there, unremovable and unpurgable !

Thanks, all of you for your help :)

amasella
2010-05-06, 02:00 PM
I used the lisp and got this, it doesn't show where the block is listed?


Command: findblocks
What's the block's name?: mapindex

There are 1 copies of MAPINDEX in the drawing.
The following is a list of containing blocks, in which MAPINDEX is nested:

and the dwg is very large file

irneb
2010-05-10, 05:18 AM
As stated before, that shows that the block is inserted somewhere in either Model Space or one of the Paper Space tabs. Type the following at the command prompt:
(setq ss (ssget "X" '((0 . "INSERT") (2 . "MAPINDEX"))))
(setq e (ssname ss 0))
(entdel e)Then do a purge. If this doesn't remove the block, we can't help you without looking at the DWG file ourselves.