AutoCAD 2013/2014/2015

Reply
Member
impliedobject
Posts: 4
Registered: ‎11-02-2012
Message 1 of 13 (3,571 Views)
Accepted Solution

xref reload and losing layer states

3571 Views, 12 Replies
11-02-2012 10:46 AM

All,

We recently upgraded from 2006 to 2013. We had a lisp routine in 06 that would reload all the xref's in a sheet so the layer states would update since simply reloading the xref did not always work. Below is the code we used. Now, in 2013, when we run it, I lose all layer states. Is there something I am missing here? Thanks for the help.

 

(defun c:xrl ()
(setvar "visretain" 0)
(command "_qsave")
(command "xref" "reload" "*")
(setvar "visretain" 1)
(command "_qsave")

*Expert Elite*
Alfred.NESWADBA
Posts: 8,893
Registered: ‎06-29-2007
Message 2 of 13 (3,570 Views)

Re: xref reload and losing layer states

11-02-2012 10:52 AM in reply to: impliedobject

Hi,

 

switching VISRETAIN to 0 also loses layer-information for XRef-depending layers, also in 2006 :smileywink:

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Member
impliedobject
Posts: 4
Registered: ‎11-02-2012
Message 3 of 13 (3,567 Views)

Re: xref reload and losing layer states

11-02-2012 10:58 AM in reply to: Alfred.NESWADBA

True, but then the routine reloads the xref, which should bring back all the layer states from the referenced file. This is what is not happening.

*Expert Elite*
pendean
Posts: 21,872
Registered: ‎11-06-2003
Message 4 of 13 (3,539 Views)

Re: xref reload and losing layer states

11-04-2012 04:16 PM in reply to: impliedobject
Why are you turning off VISRETAIN? Explain your need, don't just recite the command's function.
Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Member
impliedobject
Posts: 4
Registered: ‎11-02-2012
Message 5 of 13 (3,532 Views)

Re: xref reload and losing layer states

11-05-2012 06:27 AM in reply to: pendean

We do it to manage any overrides that are on the sheet file. We turn it off and save to relase the restraints. We then reload the xref (which when it worked in 06, would reload it completly with all layer states and specific layer changes). We then turn visretain back on so that furutre changes made to the base file would in theory show in the the sheet file. The problem I have it that it blows out the layer states on reload. 

*Expert Elite*
dgorsman
Posts: 5,116
Registered: ‎10-12-2006
Message 6 of 13 (3,518 Views)

Re: xref reload and losing layer states

11-05-2012 10:58 AM in reply to: impliedobject

Does 2006 release include settings for auto-purging layer states?  I think this might be a case of new settings being left in a default value which conflicts with your intended work flow.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


*Expert Elite*
pendean
Posts: 21,872
Registered: ‎11-06-2003
Message 7 of 13 (3,507 Views)

Re: xref reload and losing layer states

11-06-2012 06:05 AM in reply to: impliedobject

Where do you create the Layer States, in 2013? If yes, post a screenshot of the pop-up, let's see which options are selected. If not, explain.

Or are you still using the old 2006 LMAN settings?

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Member
impliedobject
Posts: 4
Registered: ‎11-02-2012
Message 8 of 13 (3,499 Views)

Re: xref reload and losing layer states

11-06-2012 07:43 AM in reply to: pendean

All base files were created in 2013 so there is no coversion of layer states. Attached are 3 shots. One is the layer states in the base file, one is the sheet file layer states before running the routine and the third is after. You can see it blows out all my layer states. The only thing I can think of is that Autodesk made changes to the visretain command. The routine worked great in 06.

*Expert Elite*
pendean
Posts: 21,872
Registered: ‎11-06-2003
Message 9 of 13 (3,475 Views)

Re: xref reload and losing layer states

11-06-2012 12:28 PM in reply to: impliedobject

Thanks for the detailed follow up: you'll have to see if anyone has an older AutoCAD version to verify, but I can repeat yourn exact description/problem in 2011 and 2012, as well as 2013 here. This only happens when the LayerStates are created in the file to be XREFed, instead of the top file.

 

So my guess is this behavior changed somewhere between R2007 and R2010.

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
New Member
davidayountii
Posts: 1
Registered: ‎03-15-2013
Message 10 of 13 (3,038 Views)

Re: xref reload and losing layer states

03-15-2013 09:02 AM in reply to: impliedobject

This is my first post, and forgive me if I may be too late offering advice for you, but I believe I figured out a way to get the embedded X-Ref Layer States to recognize again in the other drawings that could be put to use in the future.

 

In the actual X-Ref/Base drawing, activate/turn on one of the saved Later States and resave the X-Ref file.  Then, back in the drawing with the X-Ref attachment, reload the X-Ref and all embedded layer states from the X-Ref should now reappear.

 

VisRetain does not apply at all for this to work.  I just double checked to make sure this worked for me.

 

So, to anyone else encountering this problem, please respond to confirm whether or not this method worked for you.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
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 to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube