Current layer setting completely ignored when adding new object

dmitriZTSCC
Contributor
Contributor

Current layer setting completely ignored when adding new object

dmitriZTSCC
Contributor
Contributor

I'm trying to create layers before working in them.

I create new layers with commands such as

-layer

a

B-Slab

This sets the layer correctly, everything is fine. Then, I go to add a slab with something like

slab

a

<list of points here>

This adds the slab just fine but... it gets added to "Slab-A". Always.

How can I fix this?

0 Likes
Reply
395 Views
3 Replies
Replies (3)

David_W_Koch
Mentor
Mentor

What Layer Key Style is set current in your drawing file?  What layer name is assigned to the Slab layer key?  Absent any Layer Key Overrides or the assignment of a different Layer Key in a Slab tool palette tool, that layer name will be used when adding a Slab, and, if that layer does not exist, then the layer will be created, using the layer properties specified in the Layer Key Style for the Slab layer key.

 

Set up a Layer Key Style that has your preferred layer names and layer properties assigned to each Layer Key, and you can skip the step where you define a layer and/or set it current prior to creating any AEC Objects that support Layer Keying.


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

dmitriZTSCC
Contributor
Contributor

I'm using the default AIA (256-color) key style and a slab is assigned to A-Slab.

I would like, simply, to control the layer to which a created object gets added in my script. That's it. That's literally all that I want. My expectation was that the currently selected layer is the layer the object gets added to but, failing that, I don't mind taking each of the objects individually, one by one, and assigning the layer for each object to what I want. Which seems to be what I need to be doing given the situation.

0 Likes

David_W_Koch
Mentor
Mentor

If you have a specific layer in mind for each object type, you can create a custom Layer Key Style that maps those layers to the associated Layer Keys.  If your layering is such that it lends itself to being broken down into components that can then be defined in a Layer Standard, you can also make use of Layer Overrides to modify the layer name if needed for one or more subsets of objects of a given object type.

 

Or, you can "disable" layer keying by setting the active Layer Key Style to <Current Layer> in the Drawing Setup dialog, Layering tab.2019-05-05_ACA2020_DrawingSetup_Layering_LayerKeyStyle_Current.png

 


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

0 Likes