Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The Selected Layer States Could Not Be Restored

20 REPLIES 20
SOLVED
Reply
Message 1 of 21
Jason.Piercey
7315 Views, 20 Replies

The Selected Layer States Could Not Be Restored

Using Vanilla 2014,  Just recently upgraded to a Win7 pro 64bit box

 

1. Open drawing file

2. Activate paperspace viewport

3. Open classic layer manager

4. Open layer states manager

5. Selected a layer state defined in an xref

6, Pick Restore

7. Receive the error "The Selected Layer States Could Not Be Restored"

 

No further information is provided.  This process has worked flawlessly on the old machine.  What has changed within AutoCAD?  Is this a 64bit thing?

 

If I import the layer state directly from the xref or from an exported LAS file, the restore works fine.

20 REPLIES 20
Message 2 of 21

Hi Jason,

 

I tested this workflow quickly on my own machine here, and didn't run into the same issue. I'm wondering the following:

 

-Does this happen to one file, only certain files, or all files?

-Are the XREF paths full or relative?

-Is the structure somehow different on the new machine than it was on your old one?

-Could you attach the files here (or provide a link to download them, if they're too large to attach to a post)? We might be able to find the cause of the issue after taking a look at a sample file where this happens consistently.


Victoria Studley
Content Experience Designer - Fusion 360
Fusion 360 | Learn & Support
Documentation | Contact Support
Message 3 of 21
pendean
in reply to: Jason.Piercey

Paths changed for the XREF by chance (you got asked to find the XREF when you opened the top file for the first time on the new PC)?
Message 4 of 21


@Victoria.Studley wrote:

Hi Jason,

 

I tested this workflow quickly on my own machine here, and didn't run into the same issue. I'm wondering the following:

 

-Does this happen to one file, only certain files, or all files?

-Are the XREF paths full or relative?

-Is the structure somehow different on the new machine than it was on your old one?

-Could you attach the files here (or provide a link to download them, if they're too large to attach to a post)? We might be able to find the cause of the issue after taking a look at a sample file where this happens consistently.


It has happened on two different projects / sets of files so far.  Old machine was XP Pro 32 bit, which worked fine.  Same set of files on Win7 Pro 64bit fails

 

Path is relative for the xref that contains the layer state.

 

Structure?  All files are server based, no other issues are occurring.

 

I'll see if I can get a set of stripped down files that demonstate the issue.

Message 5 of 21

I've moved the files from the server to C:\Temp.  Repathed xrefs, etc...  purged any extraneous data and left these sample files with the bare minimum amount of information that still exhibits the issue.

 

 

Edit:  The xref'd layerstate is the issue.  The other one I imported from the xref, which works fine as noted in my initial post.

Message 6 of 21

Hi Jason,

 

Thank you for attaching the files. I've been testing them here, and I'm seeing the same error you're seeing. Then, if I detach the XREFs from the "13097_XplanStructure" file, I am able to restore the layer state for this XREF in the "13097_01 Plans" file. It appears that you cannot restore the layer state due to the nested XREFs. As a test, if you detach these nested XREFs, are you then able to restore the layer state?

 

Of the files you're experiencing this issue with, do they all use a nested XREF structure (XREFs within an XREF)?


Victoria Studley
Content Experience Designer - Fusion 360
Fusion 360 | Learn & Support
Documentation | Contact Support
Message 7 of 21


@Victoria.Studley wrote:

Hi Jason,

 

Thank you for attaching the files. I've been testing them here, and I'm seeing the same error you're seeing. Then, if I detach the XREFs from the "13097_XplanStructure" file, I am able to restore the layer state for this XREF in the "13097_01 Plans" file. It appears that you cannot restore the layer state due to the nested XREFs. As a test, if you detach these nested XREFs, are you then able to restore the layer state?

 

Of the files you're experiencing this issue with, do they all use a nested XREF structure (XREFs within an XREF)?


Thanks for the confirmation.  Yes the files I use will nearly always have nested xrefs.  This must be a 64bit bug (AutoCAD/Windows?).  Another project, using nested xrefs, restoring the layersate worked fine on a 32bit version of AutoCAD and Windows XP.  I tried those same files on the 64bit setup, it failed.  That was the first time I noticed the issue.  Then the sample files I provided to you are also failing, as you've confirmed.

 

Message 8 of 21


 As a test, if you detach these nested XREFs, are you then able to restore the layer state?

 

 


Yes, if I detach the xrefs it works fine. However that is completely unacceptable as my plot sheets would be blank.

Message 9 of 21

After a few quick tests this morning it appears this is not really an issue with just nested xrefs.  It seems to be dependent on renaming the xref instances.  For example, in the "13097_XplanStructure" file, if I detach all xrefs except for "13097_Xplan" the restoration works. All of the other xref instances have been renamed from their original, expcet for "13097_Xplan".

 

Again, this was not an issue in the previous 32bit setup.

Message 10 of 21

Even worse now.  I previously imported the layer state from the xref (since the restore directly from the xref doesn't work as noted) and the definition has since changed.  So, I delete the imported state and attempt to re-import from the xref.  After selecting the layer state to import I get the same "Layer state could not be restored" error message.  Hmmm yeah... I wasn't restoring, I was importing.  Regardless the layer state doesn't get imported 

 

So since the restoring and importing layer state mechanisms appear to be completely broken at this point, I decided to try and import via LISP.  LayerState-ImportFromDB also fails (returns nil). Yes, I've checked the order of arguments and typos in the layer state name and or drawing name. So now that I'm completely hosed, what are my options to make this work like it is supposed to in the first place?

 

Where is the 'make the 64bit environment work like the 32bit environment' switch?

Message 11 of 21

I’m also getting the follow error from layerstate-importfromdb


; error: ADS request error

 


Exporting the layer state to a LAS file, then importing does at least complete. However, trying to actually restore the layer state doesn’t. I’ve checked the state’s definition and not seeing the proper results after restoration.

 

So, I get to modify each viewport manually now? Wow. Just wow.

Message 12 of 21
pendean
in reply to: Jason.Piercey

Without specific examples specific to you (your LAS and DWG file) your description is too "light" for remote assistance. Try again if you want more than 'wow' 🙂
Message 13 of 21
Jason.Piercey
in reply to: pendean

Dean,

 

Despite your on going need to reply on virtually every thread, if you have nothing of value to contribute, please don't.  If you're not familair with how to deal with ZIP files, the layer manager, exporting, importing and restoring layer states, I'd be happy to walk you through those simple steps if you'd like to learn how.

Message 14 of 21
pafievez
in reply to: Jason.Piercey

Jason,

 

we have been on Win 7 x64 for quite some time and have had no problems with layer state manager until we upgraded to AutoCAD 2014 SP1 from 2012.  I have our suppliers looking into the issues.  I am seeing that the issues are only present with drawings and xref files that were creeated in previous drawing file types.  Testing this morning with an xref file and base file that were both created in 2014 work as expected.  I had to go into my xref file and wblock to a 2013 save type.  Export the defined layer states to an *.LAS file.  Import those layer states into the newly wblocked xref file.  At that point the defined layer states in the xref file work in the xref file.  I found that i had to edit and save the defined layer states in the xref to get them to operate correctly in the base file.

 

I hope this helps and if you find something better i would be greatful for getting it passed along.

Message 15 of 21
Jason.Piercey
in reply to: pafievez


@pafievez wrote:

if you find something better i would be greatful for getting it passed along.


It appears that 2015 does not suffer from the same issues as 2014.  Not sure if using 2015 is really 'better' but it's certainly less hassle than dealing with the failures of 2014.

Message 16 of 21
hackett1980
in reply to: Jason.Piercey

So I'm not an expert but I ran into this same problem and stumbled upon a possible solution to the problem. When I tried to import a layer state from another dwg I got the infamous layer state cannot be restored message. Then I remember the xref files changed names slightly because the project manager didn't want a space in the name. We just updated the path but not the name in the xref manager. Once we actually updated the names in all the files, the layer state imported and worked fine. This worked for our case so I thought I'd pass it on.

Message 17 of 21
Jason.Piercey
in reply to: hackett1980

I'm running into this issue again with Vanilla 2018 on a Win10 Pro box.  There are no spaces in the names.

Message 18 of 21

It appears that exporting the state to an LAS file and importing does not suffer from the same issue as directly importing from a DWG file. 

 

At least that works but extra steps are unwanted.  So something is messed up again with 2018 and the direct import.

Message 19 of 21

This issue has appeared again today. Wblocking the nested xref into a new file appears to have solved the issue. FYI is all.

Message 20 of 21
Garga
in reply to: Jason.Piercey

hi all,

this topic is little bit old but I have the same problem wit my autocad architecture 2021.
xref1.zip  here I made the changes
freeze.zip here I have exported freeze.las

xref.2.zip here I want to import the changes from freeze.las but its not working

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost