AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

Distinguished Contributor
Posts: 112
Registered: ‎04-18-2011
Message 1 of 3 (755 Views)

attaching an XREF & assigning it to layer zero AUTOMATICALLY

755 Views, 2 Replies
07-15-2011 09:09 AM

hi all

i want to be able to set my autocad up so that whenever i attach an xref, it gets brought in on layer Zero instead of being brought in on whatever the current layer is.

I often work in defpoints layer and when i attach an xref to get a quick schematic plot of something, i can't see the xref cos it was brought in on defpoints/current layer!


can this be mastered with a lisp which gets added to my startup suite?

Distinguished Contributor
Posts: 205
Registered: ‎04-21-2008
Message 2 of 3 (754 Views)

Re: attaching an XREF & assigning it to layer zero AUTOMATICALLY

07-15-2011 09:12 AM in reply to: barry2104

The real answer is to not draw in defpoints in the first place, its a layer used by AutoCAD for calculating dimensions etc.


create your own layer, & use that.



to make an xref on layer 0, the easy way is to set layer 0 as current & then start the xref command...


create a new button & use the following command...




this will mean you are now on layer 0 not your layer of choice for drafting so dont forget to move yourself back

Time is an illusion, lunchtime doubly so
Posts: 177
Registered: ‎11-13-2008
Message 3 of 3 (716 Views)

Re: attaching an XREF & assigning it to layer zero AUTOMATICALLY

07-15-2011 01:39 PM in reply to: barry2104

Yes, this could be done with a lisp routine.


You can define a new XATTACH command to replace the default XATTACH by undefining it in S::smileyfrustrated:TARTUP.


You might also be able to accomplish this with a reactor that triggers anytime you attach an xref.


I have to agree with the other poster. Drawing on the DEFPOINTS layer is poor practice. I also don't draw anything on layer 0 unless I am creating a block. Any object on layer 0 in a block takes on the color of the layer it is inserted to.

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.