MarcoW Posted September 15, 2011 Posted September 15, 2011 Hi there, When inserting a new layout from a template file, by using the command "-layout" "template"etc., in a new drawing this is working fine. Now, when doing the same thing again, AutoCAD returns me this message on the command line: Unit-scaling inserted database...Duplicate definition of layer state "ACAD_VIEWS_1st_floor" ignored.Duplicate definition of layer state "ACAD_VIEWS_Basement" ignored.Duplicate definition of layer state "ACAD_VIEWS_Unit" ignored. I went through everything I could think of, and of course the layer state manager. But I cannot find where those "ACAD_VIEWS" are stored. Obviously it is importing something wich is already there: hence the message. Any thoughts on this one? Thanks in advance! Quote
nestly Posted September 15, 2011 Posted September 15, 2011 I believe it means you're inserting something that has layer states with the same name as the layer states that already exist in the drawing, so it's ignoring the new layer states definition and using the ones already in the drawings. The same thing happens if you try to insert a block with the same name as a block that's already in the drawing. Quote
MarcoW Posted September 15, 2011 Author Posted September 15, 2011 So the question is where to look in the *.dwg for the views so I can delete them. In that case there are no views or layerstates that can be duplicated... Any idea? Quote
nestly Posted September 15, 2011 Posted September 15, 2011 LAYERSTATE from the command line, or the 3rd button from the left in the Layer Manager Quote
MarcoW Posted September 15, 2011 Author Posted September 15, 2011 Thanks for the reply Nestly but that is where I have checked. It's not in there.... There is only one block definition in the drawing but even if I explore that one I cannot figure this out... beats me :-\ Quote
nestly Posted September 15, 2011 Posted September 15, 2011 I tried it with AutoCAD2011, and the message I got was similar, but worded differently when I tried to insert a layout with layerstate name that was already in the drawing, so I'm not sure if it's actually something different, or just a change in wording between 2009 and 2011. Command: <Layout from Template> Duplicate definition of layer state "test" ignored. Command: Can you post the template? (you have to change the extension to .dwg as the forum software won't allow .dwt files to be attached) Quote
MarcoW Posted September 16, 2011 Author Posted September 16, 2011 Found the answer here. Look at page 14 where it says: Layer State LISP APIs In AutoCAD 2008, a new set of API functions was added to allow LISP access to the most common layer state operations. The new functions are as follows:(layerstate-addlayers) Adds/updates a series of layers to a layer state(layerstate-delete) Deletes a layer state(layerstate-export) Exports a layer state to an .LAS file(layerstate-getlayers) Returns a list of the layers saved in a layer state(layerstate-has) Checks if a layer state is present in the drawing(layerstate-import) Imports a layer state from a specified .LAS file(layerstate-rename) Renames a layer state(layerstate-restore) Restores a layer state into the current drawing(layerstate-save) Saves a layer state in the current drawingCheck your AutoCAD help for specific usage details. When you save a new view in AutoCAD there is an option to save a layer snapshot with the view. This snapshot is a standard layer state that is flagged as hidden so it won’t show up in lists in the usual places. They are typically saved with the following naming convention: “ACAD_VIEWS_viewname”. These won’t show in the Layer States Manager list nor will they be listed in the -LAYER command but they can still be accessed and manipulated like any other layer state using -LAYER or the layer state LISP functions So that is a stupid function to have in AutoCAD. Anyway I deleted the views and there is no more error. Thanks Nestly for your kind help, hope you appreciate me sharing the solution! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.