AutoCAD Layer States Importing Incorrectly

AutoCAD Layer States Importing Incorrectly

Anonymous
Not applicable
8,396 Views
15 Replies
Message 1 of 16

AutoCAD Layer States Importing Incorrectly

Anonymous
Not applicable

I have created several layer states with configured layer settings (Colors, Line Types & Weight) and have exported them to (.las) file to import into existing documents that do not have the Layers needed for our designs.  Everything looks fine when the Layer States are exported but when I import them into a clean document all the layer names come in but none of the other properties come through.  All Layers are changed to White.  Does anyone know why this is?  All updates are installed; software requirements are met & etc.

 

Thanks

Accepted solutions (1)
8,397 Views
15 Replies
Replies (15)
Message 2 of 16

cadffm
Consultant
Consultant

Apparently you import only the Layerstate, you want to restore the Layerstatus however.

1) Import * .las,

2) then Restore the Status.

Sebastian

Message 3 of 16

Anonymous
Not applicable
First import then restore! This always work for me!
Message 4 of 16

pendean
Community Legend
Community Legend
What version of AutoCAD are you using? Is it fully patched and updated?
LAS works fine and as expected here, so you will need to start sharing files (LAS and dwg files where it fails) for others to examine.
0 Likes
Message 5 of 16

Anonymous
Not applicable

I'm using AutoCAD 2016 and as mentioned in the original post, all updates and patches are currently installed.  I'm importing the Layer State into an AutoCAD default template (acad.dwt) for testing so I highly doubt its a corrupt .dwg file. It seems to only be happening for one of my layer states.  I have re-created the Layer State just as I did before and now it mysteriously works.  I have seen this happen before but I cant seem to get to the root of the issue.  I have tried turning "Hardware Acceleration" Off/On to see if it made a difference but that didn't resolve the issue before. 

 

Another thing that is odd is when importing the Layer State I'm getting an error message stating; "Restore could not restore all line types".  After selecting "Ok" I'm able Restore the States and everything looks fine.  This is particularly puzzling considering all the line types in the Layer State are "Continuous".  You may or may not know but from my experience that message only presents itself if the current drawing does not contain all the line types referenced in the layer state file. A secondary possibility to receiving the error message would be data corruption but both files are clean and only contain Layers and Layer States.

 

 

0 Likes
Message 6 of 16

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

Can you attach the source file for the LAS and the LAS file? I would like to test on my computer to see if it behaves any differently.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 7 of 16

Anonymous
Not applicable

Hi John,

 

As mentioned above It seems to be partially working now. I have tested it once more and notice now that the same notification stating; "Restore could not restore all line types" is displaying when importing the "Demo" and "New" Layer States resulting to the line types changing.  Demo layers are industry standard and should be "Dashed".  They look correct when you look into the Source file Layer State.  Let me know what you find. See attached files. Sent you the documents via A360.

 

Rudy Orona

0 Likes
Message 8 of 16

john.vellek
Alumni
Alumni
Accepted solution

Hi @Anonymous,

 

I apologize for taking so long to get back to this issue for you.

 

If you are seeing the issue with linetypes, you might consider pre-loading them into your drawing either with a LISP routine or even an Action Macro.

 

I imported your layer states and did see the linetype issue too. I think that if you make sure they are loaded first then your problem will go away. You could even embed all the linetypes into a block that can be inserted into the file on a non-plot layer.then run the layer states and it should work fine.

 

 

Please select the Accept as Solution button if my post solves your issue or answers your question.

 

 


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
0 Likes
Message 9 of 16

Anonymous
Not applicable

Hi John,

 

No worries, the issue was not time sensitive and I managed despite the notification.  Your suggestion makes some sense but it creates an additional process to incorporate when loading Layer States.  Ideally I'd like to Import > Restore and trust that everything is there without having to load all the associative line types. 

 

Maybe this is something you can take up to the developers at Autodesk. I'm sure I am not the only one having this issue. As mentioned, it is a hassle especially if the Layer State is composed of many different linetypes.  This makes it more difficult to enforce and maintain standards when you’re having to cross-reference and verify Layer properties prior to loading a Layer State each time.

 

Rudy Orona

 

 

0 Likes
Message 10 of 16

john.vellek
Alumni
Alumni

Hi @Anonymous,

 

Perhaps you can incorporate the linetypes into your drawing template. They could be purged out though. I usually deal with this and missing text styles, dimstyles, etcbe creating a lisp routine that imports all of this with the click of a button.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 11 of 16

timpy6
Contributor
Contributor

I tried exporting the default "All Color" state and it never imported the colors correctly into another drawing. Things finally worked properly after I did this process:

1. in the original drawing (with the desired layer conditions), click New... and name a new layer state.

2. make sure that all the layer properties to restore are checked and that the new state is still selected, and then click Update so that the current new layer state is updated to the existing layer conditions

3. click Export and name it your new name

4. open the drawing that you need the layers updated and choose Import and then choose the new exported layer state

5. choose yes to Restore in the pop up box

 

It seems that the default "All Color" state will not import and export properly. You need to create a newly named layer state. Also, make sure that you're starting in Model Space during the export process and then in the new drawing Importing while in Model Space. Otherwise, you get issues. Then it all worked for me. I hope this helps.

0 Likes
Message 12 of 16

m_herreraWHVKD
Observer
Observer

Hi! I came to see if this pop-up meant some error in my newly imported layers, I don't think there is any, everything looks to be in order. However, I do not know if someone has had this other issue where the imported layers appear to be all white and the color I had set up is in the Viewport color section. This is due to having started the import process while in the Layout tab, not on Model space. I switched and reloaded (undid the previous import) and they loaded correctly but still produced the pop up, hence why i came here as a last resort. I will edit if I find out what is not loaded. Hope this saves you some stress if it occurs to you as well. 

0 Likes
Message 13 of 16

cadffm
Consultant
Consultant

Hi,

you didn't describe the pop-up.

What are you talking about?

Sebastian

0 Likes
Message 14 of 16

m_herreraWHVKD
Observer
Observer

HI! My bad, after clicking ok on the import layer state window, a small pop-up from AutoCAD that says 'Restore could not restore all line types' with the only option being OK. Clicking it pops up a second window "Layer State Successful Import" that says where the layer state is saved, and has the option to 'Restore State' or 'Close Dialog' which is what i believe restores the layers after importing them, solving the issue.

m_herreraWHVKD_1-1716906874372.png

 

0 Likes
Message 15 of 16

cadffm
Consultant
Consultant

Hi,

Import is import only.

You can Restore an existing layerstate (after import, they existing).

 

Linetype&Restore

Linetypes (linetype definitions) are not stored in a .las file, and your target file don't have this one or more needed linetypes.

You have to load them manually

OR: Use .dwg instead .las files! If I remember well, this will work.

Export layerstates to .dwg (or import them directly from your source file)

Sebastian

0 Likes
Message 16 of 16

TomBeauford
Advisor
Advisor

I'd use a call to Lee Mac's Steal from Drawing lisp to import the Linetypes and Layer States with one call then Restore the Layer State. https://www.lee-mac.com/steal.html

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes