Author Topic: How to delete Xref-dependent layer?  (Read 20363 times)

0 Members and 1 Guest are viewing this topic.

Fabricio28

  • Swamp Rat
  • Posts: 666
How to delete Xref-dependent layer?
« on: November 23, 2012, 01:57:57 PM »
Hi guys,
I want to delete Xref-dependent layer.
AutoCAd says I can't delete it.
I want to delete them. How can I do that?

Thank in advance.

Coder

  • Swamp Rat
  • Posts: 827
Re: How to delete Xref-dependent layer?
« Reply #1 on: November 23, 2012, 02:37:31 PM »
use command laydel

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: How to delete Xref-dependent layer?
« Reply #2 on: November 23, 2012, 03:36:59 PM »
It is impossible to use command laydel.
Because the Xref is attached as a block.

Is there other possibility?

Thanks

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: How to delete Xref-dependent layer?
« Reply #3 on: November 23, 2012, 03:39:43 PM »
Open the Xref, remove the layer from that drawing, save, close, reload Xref

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: How to delete Xref-dependent layer?
« Reply #4 on: November 23, 2012, 05:36:10 PM »
Hi Jeff_M

Thanks for replay...

I can't do that. Because the Xref drawing contain layer that I can't remove.

On the other hand, I won't need all layer in the layer-Xref's drawing.

Regards

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: How to delete Xref-dependent layer?
« Reply #5 on: November 24, 2012, 07:08:04 AM »
Freeze the XRef layers that you don't need?

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to delete Xref-dependent layer?
« Reply #6 on: November 24, 2012, 07:29:07 AM »
I don't understand ... an xref-dependent layer means that layer comes from the xreffed DWG file. It's not inside the current DWG, so you cannot delete it directly inside the current DWG. If you don't want that layer, then delete it from the xreffed DWG (that's where it IS). Or detach the xref so it doesn't bring any of its layers into the current DWG.

If you want to keep it inside the xreffed DWG, but not show it in the current yet still show some other layers from the xref, then as Lee's stated: Freeze/Off/VPFreeze the layer so it doesn't appear in the current drawing's graphics. Appart from the above 2 methods (delete / detach) there is no way to get rid of the layer in the Layer Manager list in the current DWG. Either live with it, or don't use xrefs.

Remember: An XRef is a link to another DWG, it's just implemented as a special type of block. So you'll see the stuff that's contained in the other DWG. But they'll be read-only since they are simply linked to from the current DWG - they're not imported (as in Insert --> browse). They're still part of the other DWG only shown in this one as well.

Edit: If by "delete" you mean you want to remove the overriden settings for it in the current DWG. Thus reloading its colour/linetype/etc. from the original xref: Then there's an issue with that. You'll need to fiddle around with VisRetain, and save the properties of the other layers so you can restore them back again. Or you'll need to use ObjectDBX to read the layer's properties from within the xref DWG then apply those properties to the dependent layer.
« Last Edit: November 24, 2012, 07:35:06 AM by irneb »
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: How to delete Xref-dependent layer?
« Reply #7 on: November 24, 2012, 08:03:35 AM »
Thank you for providing a far more thorough response Irneb  :-)

Edit: If by "delete" you mean you want to remove the overriden settings for it in the current DWG. Thus reloading its colour/linetype/etc. from the original xref: Then there's an issue with that. You'll need to fiddle around with VisRetain, and save the properties of the other layers so you can restore them back again. Or you'll need to use ObjectDBX to read the layer's properties from within the xref DWG then apply those properties to the dependent layer.

The following program may help in that respect:

http://lee-mac.com/resetxreflayers.html


irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to delete Xref-dependent layer?
« Reply #8 on: November 24, 2012, 08:26:02 AM »
I've actually just thought of a non-programming way of performing that selective layer reload idea (probably not the first guy to think of this though):
  • Make a backup copy of the xref DWG file.
  • LayDel the layers you want to reload inside the XRef.
  • Save the xref and reload into the containing DWG.
  • Close the containing DWG.
  • Restore the backup of the xref.
  • Reopen the containing DWG ... those layers should now have loaded as if they are new layers.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: How to delete Xref-dependent layer?
« Reply #9 on: November 25, 2012, 10:06:47 AM »
Thank you guys for replay,

Quote
I've actually just thought of a non-programming way of performing that selective layer reload idea (probably not the first guy to think of this though):
Make a backup copy of the xref DWG file.
LayDel the layers you want to reload inside the XRef.
Save the xref and reload into the containing DWG.
Close the containing DWG.
Restore the backup of the xref.
Reopen the containing DWG ... those layers should now have loaded as if they are new layers.

Thanks for the tip, irneb. I'll do that, maybe it works.
But I thought that had other way to do that, like a lisp LayDel xref.

And also thank you Lee Mac.
I'll take a look into your code and I let you know if it works.

Best Regards.
« Last Edit: November 25, 2012, 10:20:29 AM by FABRICIO28 »

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: How to delete Xref-dependent layer?
« Reply #10 on: November 25, 2012, 10:17:14 AM »
I have a main file,about 50 layers. And I have to create other projects through this main file.
The problem is, I don't need all layers to create other projects, I just need some of them.

And my question is How to delete Xref dependent layers?

Because I have a lisp that freeze Xref dependent layers, and I thought that had delete Xref layers.

Thank in advance.
Sorry for my poor english.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: How to delete Xref-dependent layer?
« Reply #11 on: November 25, 2012, 11:56:03 PM »
Again ... that is imposible. The only way you can "delete" that layer is to delete it from the main file. That's why it's called "dependent", it "depends" on the xref, it is not actually part of the current drawing.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Fabricio28

  • Swamp Rat
  • Posts: 666
Re: How to delete Xref-dependent layer?
« Reply #12 on: November 26, 2012, 05:27:10 AM »
Quote
Posted by: Lee Mac
« on: November 24, 2012, 08:03:35 am »

Thank you for providing a far more thorough response Irneb

Thanks irneb. I get it.
I was just explaining my task.

Best Regards
 :lol: