AutoCAD .NET :: Obtain The Current Layer State?

Sep 10, 2013

how to obtain the current layer state?

View 5 Replies


ADVERTISEMENT

AutoCAD .NET :: Operation Is Not Valid Due To Current State Of Object?

Jan 5, 2012

my code is:

Dim AcadDoc As Document = Application.DocumentManager.MdiActiveDocument Dim CurDb As Database = AcadDoc.Database Dim lt As LayerTable = DirectCast(tr.GetObject(CurDb.LayerTableId, OpenMode.ForRead), LayerTable)
 if fails on last line with error:-

Operation is not valid due to the current state of the object.

View 6 Replies View Related

AutoCAD .NET :: Layer States / Layer State Masks In VB

Jun 10, 2011

My goal is to batch plots using VB in Visual Studio 2008, Autocad Map 3D 2010, Win 7 Pro 64.  It all works but now I want to apply layerstates.

I am using the example in the dev. guide here: [URL]........

My questions:

1. If you use Option Strict, how do you convert from integer to "layerstatesmasks.color"?  VS shows the error "Option Strict On disallows implicit conversions from 'Integer' to 'Autodesk.AutoCAD.DatabaseServices.LayerStateMasks'."  I can't figure out the conversion.  Are the values documented somewhere?  "clientmask" is not in the object browser or the dev. guide.

2. If you aren't sure what is masked, do you turn on all of the options on (on, color, linetype, lineweight, etc.)?  Is there a sum of values that means "layerstatemasks.all"?

3. LAS files are DXF format.  Do I have to read the LAS to detemine what the user wants?

4. The second argument to .restorelayerstate is the viewport id.  The examples use objectid.null.  I could have several layouts to plot, and maybe several viewports.  Is the process a) Make the layout current, b) activate each viewport, c) set model space current, and d) restore the layerstate?   

View 2 Replies View Related

AutoCAD 2010 :: Layer Toolbar Won't Show Current Layer Selected

May 8, 2012

When i click on the green line has you can see on the image. The layer toolbar wont show me the right layer, like if it's not working. But i can see the right layer inside propreties.

Is there a system variable to ajust to see my layers inside the Layer tool bar?

View 1 Replies View Related

AutoCad 2D :: Create New Layer And Set It As Current In Layer Manager?

Nov 18, 2011

I'm currently using AutoCAD LT 2012 and when I create a new layer and set it as current in the layer manager, regardless of what color I set the new layer to, the new layer's color remains the same as the previous one in the properties box even though the colors of the layers are always set to "by layer."

View 3 Replies View Related

AutoCad :: Edit Layer State

May 23, 2013

I'm working with AutoCAD LT 2013. Just recently my layer State has not allowed me access. When I try to add a layer or edit a layer I can't get access and I get a pop-up note which reads:

"ALL LAYERS ALREADY INCLUDED IN THIS LAYER STATE. NO LAYERS CAN BE ADDED"

When I access layer states manager I can add a new layer-BUT it does not show up in Layers. Acts like the Layer State is Frozen to further modifications.

View 0 Replies View Related

AutoCad :: Layer State Changes When Restored

Aug 1, 2013

When I restore a saved layer state in one viewport the adjacent viewport (with a different saved layer state) changes. I also don’t seem to be able to save these edited layer states so that they retain my edits.

View 3 Replies View Related

AutoCad :: Objects Off In Layer State Still Displays

Jul 5, 2013

I'm working with AutoCAD Architecture 2011 and working in the xref. I have my layer states set up, no problem. However, I have a layer that still shows up in all states even tho it is not saved in the layer states. If i click on it, it shows as off. It is a block, I have it on the ByLayer and the correct layer.

View 1 Replies View Related

AutoCAD 2010 :: Apply Layer State To Multiple DWG

Jul 30, 2012

Is there a way to apply a Layer State to multiple DWGS, without going into each DWG?

View 3 Replies View Related

AutoCAD 2013 :: 2014 Layer State Pull Down?

Apr 23, 2013

In autocad 2013 there was a pull down menu in the layer panel for layer states. 2014 does not have that. How to get that to show up in 2014? I also need the pull down menu for dimension styles.

Unless im missing something it seems like it takes more move to do some basic stuff in 2014.

View 2 Replies View Related

AutoCAD 2013 :: Maintain Customized Layer State

Nov 5, 2012

Im having a layer state issue with ACADE 2013;Vive saved a Layer state ("trial state") that has about 30 layers and some of them have been frozen.

I made the trial state the current layer state, however, when I save and close the drawing and then reopen it, "Trial State" is no longer the current state. Instead the layer state is changed to "Unsaved Layer state", and I have to manually select my trial state each time. I haven't even modified any layers or added more layers and it does this.

Im wondering if there is any way to keep/lock my customized layer state on a drawing.

View 5 Replies View Related

AutoCAD 2010 :: Use The Layer State Manager Within Viewports?

Jan 31, 2013

Let's say you create a floor plan, and you use the Layer State manager to separate the framing plan, finish plan, reflected ceiling plan, etc. Now, when you go to create a sheet, you xref this plan into model space with all of the layers thawed/on, go to your titleblock in paper space and make a viewport.

Currently, if I click into a viewport and use the Layer State manager to show just the information of the RCP, it will freeze all of the layers I don't need, but it will freeze those layers in model space, instead of just within the viewport. It gets very time consuming doing it the way I always understood to do it; making sure all layers are thawed/on in model space, and then going into each viewport and manually VP-freezing each layer I don't need.

So can Layer States be set up to work within viewports, to only have those layers VP-frozen?

View 1 Replies View Related

AutoCAD LT :: Layer State File Not Visible When Importing

Aug 26, 2013

I  have several .dwg files from an architect each with several hundred layers. I set up a Layer State in one drawing with just the layers I need. I want to use the same Layer State in the other drawings. I opened the Layer States Manager, selected my layer state, and clicked export, selected a location and closed the window.

I double checked in the file manager in Windows 7 that the .las file was where I had exported it. Then I opened the next .dwg, opened Layer States Manager, navigated to the file location and the .las file does not show up.

When I go back to the original drawing and click Import, the .las file is not visible either, but it is if I click Export.I am working on drawings on my hard drive not a network, and saving the .las file to my hard drive.

View 2 Replies View Related

AutoCAD 2010 :: Add Layer State Drop-down To Toolbar?

Aug 21, 2012

I would like to add the layer state drop-down from the ribbon to one of my toolbars, but can't find it in CUI command list.  Is this feature only available with the ribbon?

LT, C3D 2005 - 2014
XP, Vista, 7

View 4 Replies View Related

AutoCAD Architecture :: Layer State Manager - Changes Not Saved

May 31, 2010

When I edit a layer state it doesn't save any of the changes.

View 1 Replies View Related

AutoCad :: Project Keeps Reverting To Unsaved Layer State?

Apr 6, 2013

i have a little layering system i set up. in my drawing, in modelspace (or on any of my sheets), there's a little drop-down box that saves 'unsaved layer state'. if i click on it, i can find my 'personal layer state', select it, and all my layers pop up. but then if i switch tabs for a second, it goes right back to 'unsaved layer state'. how do i keep this on my own personal one?!

View 1 Replies View Related

AutoCad :: Default Layer And XCLIPFRAME State When It Opens

Oct 6, 2011

Whenever I create a new autocad drawing or open an existing autocad drawing it seems to automatically set my layer to default of "dim" in lieu "0" or whichever last layer I was on before I closed and saved the file.

The same goes for XCLIPFRAME. For some reason XCLIPFRAME is automatically set at 2 in lieu of 0 whenever I open any existing autocad files (again it does not matter whichever state I saved the drawing in)

I've checked my default template dwt file and i've made sure these settings are right.

View 1 Replies View Related

AutoCad :: Saving Layer State On Paper Space?

Apr 11, 2012

How do you save a layer state on Paper Space???

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Layer State Delete

Feb 20, 2013

i have a small lisp and i would like for it to:

when i invoke the plot command, it will first check if there is a layer state called "Temp"if "Temp" exists, then delete "Temp", then re-create "Temp", then switch layer state temporariliy to "Plot" to plot the file, and then switch back to the "Temp" layer state againbasically, the "Plot" layer state will be set based on how the drawing(s) will plot. if a user makes changes here-n-there in the drawing, when the user wants to plot, the software will save current state as "Temp", plot using the "Plot" state, and switch back to "Temp" state at the end. all i am trying to achieve is to somehow over-write the "Temp" state. below is the LISP.
 
(command "undefine" "plot")
(defun clot ()
(if (layerstate-has "Temp")
(layerstate-delete “Temp”)
)

[Code]....

Civil 3D 2013 SP1, Win 7-64 bit
12GB RAM

View 9 Replies View Related

AutoCAD Civil 3D :: Surface Contours Correct With One Layer State

Apr 9, 2013

I have a surface that shows perfectly when restoring the PCSM layer state (Old LMAN function). When I restore the Grading layer state - the surface contours show incorrectly.

It is like a hide or mask feature turns on and off.

View 1 Replies View Related

AutoCad :: Layer State Overrides To View Ports Using Filter

Jan 18, 2013

When I save layer states overrides for a certain view port and mane it e.g. "K", in layer state manager current layer state is shown as "K", but when I change layout and come back to this one, in layer state manager current layer state is shown as *UNSAVED* again!!!

This results in a great problem. If I update layer state "K" it does not update all view ports that should have layer state "K" automatically so I have to go trough all of them again and apply "K" again and again after any change to "K" is made.

Link to other thread: Apply Layer State Overrides to view ports using filter which, if answered could bypass the problem.

View 5 Replies View Related

AutoCAD 2010 :: Layer State Assigned To Viewport Can Only Restrict Layers Showing?

May 13, 2013

Why a layer state assigned to a viewport can only restrict the layers showing?  I want my viewport to show the proper layers all the time, even when those layers are not visible in model space. 

C3D 2012 SP2.1
WIndows 7 SP1 64 bit
24GB RAM
Dual quad core xeon 3.2ghz cpu's
Triple Monitors

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Applying Layer State To Multiple DWGs

Jul 31, 2012

A quick way to apply a Layer State to multiple DWGS?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Change Layer State Names

Nov 2, 2011

I have 2000+ drawings that have either the layer state "LMAN_DWF" or "DWF".  I want all of them to read "DWF" for scripting purposes. LSIP routine that will go into a drawing and change rename a layerstate if it is named incorreclty, but do nothing if it is named correctly?

Does Layer State "DWF" exist?

If Yes, skip file and move on to next file

If No, does Layer State "LMAN_DWF" exist?

if Yes Rename Layer State to "DWF"

If No, skip file and move to next file.

Or a LSIP routine that can simply dump a list of all drawings in a directory that contain "LMAN_DWF" as a layer state.  I could then use that list to do a simple script to change the layer state names on those specific files.

View 2 Replies View Related

AutoCAD 2013 :: Finding System Variable To Shut Off Layer State Preview

Mar 25, 2013

is there a system variable to shut off the layer state preview?  I would prefer to use the drop down and select the desired layer state, the preview slows this process down.

 C3D 2011, 2013 (latest updates)

Win 7 Pro, 64-bit

16 GB RAM

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Layer State - Ignore Any Newly Created Layers?

Aug 8, 2013

we have a good size project going on with lots of view ports of a base map (floor plan or site plan).  Then we set the viewport layers the way we would like it, but along the way, we keep getting updated base maps (floor plan or site plan) with new layer created in them.  These newly created layers are for the originator and will not affect our project.

Is there a way to have our project set to ignore any newly created layer from the originator of the base files?  That is, we have our project (viewport layers) set the way we want it.  When we get an updated base file, replace the xref(s), our layer state will still be the same, ignoring any newly created layer, automatically.  I sure hope I am clear enough here.

Our problem is that when we get a new base file, then we would have to go to every file that has a viewport related to this new base file and turn off the new layers.

AutoCAD 2014

View 1 Replies View Related

AutoCad :: VP Freeze A Layer In All BUT The Current VP

Sep 17, 2013

I'm working with a DWG that already has a-gazillion VPs.

I'm currently making new layers, but the "New VP Freeze" option only seems to apply to new VPs made AFTER the creation of the layer.

I need the new layers I'm making to be Frozen retroactively, if you will, in all previously-made VPs.

Short of going into each and every VP and manually VP Freezing these few layers, what can I do?

View 1 Replies View Related

Photoshop :: Create New Layer *under* Current Layer?

Sep 21, 2006

way to do this from the layers menu (ctrl-click new layer icon), but is there a key combo? I use shift-ctrl-n a lot to make new layers, but often I need to make a new layer *below* the current layer.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Update Layer State In All Viewports Across Multiple Files

Nov 8, 2013

I'm creating a drawing set that has over 100 sheets with varying amounts of viewports on each sheet (from one to four). Each sheet is its own file, so there is only one layout per file. For each section of the drawing set, the viewports will have the same layer state.

Is there were a way to update the layerstate of each viewport through a batch LISP routine? This would save me DAYS in opening each file, importing the layer state, and restoring it for each viewport. It seems straight forward, but I have no idea where to start with batch routines.

View 4 Replies View Related

AutoCAD .NET :: Making A Layer From Xref Current

Mar 27, 2013

I want to make a layer from external reference current.

I tried to identify it with its full name, but I got an error: eInvalidInput. So I found out, I have to use only the part behind the pipe.But then there is a problem, because this name is not unique withing the drawing.

Any number of xrefs can have such layer and also the drawing itself can have a layer with the same name. How exactly can I set a layer from xref current?

example:

layer from xref1: Xref1|LayerName1
layer from xref2: Xref2|LayerName1
layer from the drawing: LayerName1

View 6 Replies View Related

AutoCAD Map 3D :: Lock Current Layer - Turning On / Off

Apr 9, 2012

Is there a way to lock the current layer (to say layer 0) so that is STAYS the current layer regardless of my isolating, turning layers on and off etc?

Really annoying to keep getting those "Are you sure you want to turn off the current layer" messages and it would prevent me from either drawing thing on a layer I don't intend to, or drawing on a layer which is off (which confuses me every time).

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved