I recently downloaded the free trial of 2017 AutoCAD MEP and wanted to know how I load all the MEP layers at once. Is there a way to do this? I am used to 2008 AutoCAD Architecture, so a lot is new to me. I have found layer keys in 2017 MEP but it doesn't seem to load the layers. I can draw a duct and it'll bring in a MECH-STD-DUCT layer in, but i prefer to choose the layer before I draw. Moreover, I wasn't able to find any plumbing or electrical layers at all.
Please help.
Regards,
Bruce
Solved! Go to Solution.
Solved by bruce.pachikara. Go to Solution.
Solved by Keith.Brown. Go to Solution.
Hi @bruce.pachikara,
Welcome to the community!
Sorry to hear about the issue. Glad to hear you are exploring MEP. If I am understanding this correctly, I would recommend reading up initially on layer key (styles), then how to specify a layer standard and a layer key style. The layer standards is what you are looking for within the layers panel.
What I have done was make a block out of it and keep it in your tool pallet.
Hi,
A similar question was discussed here AMEP 2017 and Layer key style
All changes must be saved in the template!
Also a good idea to use a tool palette with preset layers styles.
Vitaly
@bruce.pachikara wrote:
I recently downloaded the free trial of 2017 AutoCAD MEP and wanted to know how I load all the MEP layers at once. Is there a way to do this? I am used to 2008 AutoCAD Architecture, so a lot is new to me. I have found layer keys in 2017 MEP but it doesn't seem to load the layers. I can draw a duct and it'll bring in a MECH-STD-DUCT layer in, but i prefer to choose the layer before I draw. Moreover, I wasn't able to find any plumbing or electrical layers at all.
Please help.
Regards,
Bruce
Hi Bruce,
I feel like the previous posters did not understand your question. I believe that you want to be able to have all of the layers available that are in the layer key styles. Well, AutoCAD MEP and AutoCAD Architecture are designed to create the layers as you are drawing so your drawing is not pre-populated with layers you might not need. Hence layer key styles. You assign a layer key style to an object and when you draw that object, it will check its layer key style, get the layer information from the layer key style and if that layer is not already present in the drawing then it will create the layer and place the object on the layer. This is done automatically, there is no manual function to create a layer based on a layer key style. Additionally, when you draw duct it will place it on the layer defined by the layer key style that is setup in the duct system definition. Even if you change your current layer before you start drawing duct it will still place it on the layer defined by its layer key style. If you want to control the layers that the duct goes on then you should instead manage your System Definitions and the layer key styles in the System Definitions. Then instead of changing the layer before you draw the duct, you would change the current system definition.
All of that being said, i created some C# .NET code that would scan the layer key styles and get the layer information and create the layer defined by the layer key style. I have included a drawing that contains the layers from the standard AutoCAD MEP imperial stb template. (I believe that this is what you were really after.) If you need any others let me know. If anyone is interested, the main code that I used is listed below. I have not included some of the standard functions, just the pertinent AutoCAD MEP Code.
[CommandMethod("CreateAllLayerKeyStyleLayers")] public static void CreateAllLayerKeyStyleLayersCommand() { using (Transaction transaction = Active.Database.TransactionManager.StartTransaction()) { DictionaryLayerKeyStyle dictionaryLayerKeyStyle = new DictionaryLayerKeyStyle(Active.Database); ObjectIdCollection objectIdCollection = dictionaryLayerKeyStyle.Records; foreach (ObjectId layerKeyStyleObjectId in objectIdCollection) { LayerKeyStyle layerKeyStyle = (LayerKeyStyle)transaction.GetObject(layerKeyStyleObjectId, OpenMode.ForRead); if (layerKeyStyle != null) { LayerKeyDefinitionCollection layerKeyDefinitions = layerKeyStyle.KeyDefinitions; try { foreach (LayerKeyDefinition layerKeyDefinition in layerKeyDefinitions) { LayerUtilities.CreateNewLayer(layerKeyDefinition.LayerName,
layerKeyDefinition.Color.ToString(),
layerKeyDefinition.Linetype,
layerKeyDefinition.Description,
false,
false,
true,
false,
Active.Database); } } catch (Exception exception) { // If unable to create the layer, just skip it } } } transaction.Commit(); } }
p.s. I am not entirely sure that the linetypes are correct for each layer. I put this together real quickly. My standard CreateLayer function took a different parameter then what the LayerKeyDefinition provided. I just cast it to a string and not sure if that entirely worked.
You mentioned AutoCAD MEP 2017, is the 2017 version available? I don't see any reference to AutoCAD MEP 2017 on the Autodesk website except for the system requirements.
Thanks,
JMV
Hi,
From previous posters...)
I'm sorry, Keith, I think it's not a good idea.
You offered cross out the the Styles, Systems and Display settings MEP...
Vitaly
Hi VitalyF,
It doesnt bypass anything. All I did was create a file with all the layers. The actual duct will still go on the layer defined by the system definition. Nothing has changed. Other than there is now a drawing with every layer in it.
Never mind! I found the file. Thanks a bunch, Keith! This was super helpful!