Layer 0 from xref file appears on current layer

Layer 0 from xref file appears on current layer

Nathan.Mantz
Contributor Contributor
477 Views
5 Replies
Message 1 of 6

Layer 0 from xref file appears on current layer

Nathan.Mantz
Contributor
Contributor

As I'm reading through and admittedly old autocad manual to learn about xrefs, I see a note that "To segregate layers in Xref files from layers in the current drawing, AutoCAD prefixes the names of the Xref file's layers with their file's name."

The issue that I'm seeing is that objects on Layer 0 from the file that I'm importing are being placed on the active layer of the current file.

How do I prevent/correct/work around this?

0 Likes
478 Views
5 Replies
Replies (5)
Message 2 of 6

apjones
Collaborator
Collaborator

That's the way AutoCAD is supposed to work.  Layer 0 is a "chameleon" layer. 

Solution is: Don't draw anything on Layer 0 unless you want this behavior.

Pete

>Please Accept as Solution and give Kudos as appropriate to further enhance these forums. Thank you!
Message 3 of 6

cadffm
Consultant
Consultant

Chamelion layer is cool 😁

 

@Nathan.Mantz 

Layer 0 is a systemlayer (always present) and not for user usage, except for some special cases

and this is what you stumbled now.

 

For usual:

Dont use system layers like 0 or defpoints and some others.

dont change systemlayer properties, like on/off freeze/thaw lock/unlock.

Layer0 is for use in blocks (or if you want to use this file as Xref, what is a block -just the content will reload from external source file),

if you want to inherit the insertion layer to this (on Layer 0 drawn) objects.

 

Layer0 is similar to "ByLayer" for other general object properties.

 

Solution in your case already stated above: Don't use Layer0 to draw, except for special cases if you want to use this feature (inherit insertion layer to these objects).

Sebastian

Message 4 of 6

Nathan.Mantz
Contributor
Contributor

I see, so I need to move everything off layer 0.

What's the purpose of this layer if I can't use it?

Sorry, I'm letting my acad knowledge level show...

0 Likes
Message 5 of 6

Nathan.Mantz
Contributor
Contributor

Thanks!  You answered before I asked.

0 Likes
Message 6 of 6

cadffm
Consultant
Consultant

Hi,

 

>>"I see, so I need to move everything off layer 0"

Yes, and this also the prefered way to work in .dwg, except you have a (technical) reason to use it.

 

>>"What's the purpose of this layer if I can't use it?"

You CAN use it and you SHOULD use it, but as I tried to explain above: It is a special Layer of .dxf/.dwg files

so you should use it when 1. You know about the specials and 2. if you need to use these specials,

otherwise:

Thumbrule

Don't use Layer0 and don't change layerproperties (do not off, freeze or lock for example), the same for other systemlayers.

Why: If you are not familiar with the special, you will get unexpected behavior every year, month - perhaps every day,

because you don't know about it.

Simple prevention solution: Don't use it, until you know why you use it.

 

Same for Systemlayer "Defpoints" - again just a thumb rule: Don't use it, it is used by system.

If you want to habe a non-plotable layer, create your own.

User defined things = for user created content.

 

 

Sample: There are 20(!) blockreferences of the same block, 4 of them are completely invisible.

Some looks equal to others, but the most are different.

That's all about Object properties BYLAYER, BYBLOCK and Layer0 usage

 

cadffm_1-1717608899294.png

 

 

 

But for Layer 0 explaination, a more simple example:

cadffm_3-1717609948788.png

3 blockreferences of one block, on 3 different layers.

You can see, you can controle the color by different layer colors (also linetype and so on),

you can hide some of them by turning the insertion layer to Freeze.

All objects inside the block, acting like they are drawn on the insertion layer.

 

 

Note: My sample is an internal block, but in fact it is the same for DWG xrefs.

Sebastian

0 Likes