Community
AutoCAD MEP Forum
Welcome to Autodesk’s AutoCAD MEP Forums. Share your knowledge, ask questions, and explore popular AutoCAD MEP topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Loading MEP Layers

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
bruce.pachikara
1860 Views, 11 Replies

Loading MEP Layers

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

11 REPLIES 11
Message 2 of 12
matthew.d
in reply to: bruce.pachikara

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.



Matt DiMichele
Autodesk Product Blogs | @ADSKCommunity Twitter

Likes are greatly appreciated. Everyone enjoys a thumbs up!

Please Accept As Solution if this resolves your issue, to help others benefit and locate it.
Message 3 of 12
bruce.pachikara
in reply to: matthew.d

Yes I've read those but the layer standards layer doesn't seem to actually
load the MEP layers.

Am I missing something. I open up a blank sheet and it's starts with 5 to 8
basic layers like defpoints. I want to bring in all the men layers.
Message 4 of 12

What I have done was make a block out of it and keep it in your tool pallet.

Message 5 of 12
VitalyF
in reply to: bruce.pachikara

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

 

 

 

Message 6 of 12


@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.

 

 

Message 7 of 12

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

Message 8 of 12
VitalyF
in reply to: Keith.Brown

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

 

Message 9 of 12
Keith.Brown
in reply to: VitalyF

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.

Message 10 of 12

Thanks Keith. Sorry for the late reply. Was out of town. You hit the nail
on the head. This was exactly my question and I see there is no built in
command to pull in all the layers. You mentioned including a drawing that
contained layers within the file. Was that attached to the email? I didn't
see it.
Message 11 of 12

Thanks Keith. Sorry for the late reply. Was out of town. You hit the nail
on the head. This was exactly my question and I see there is no built in
command to pull in all the layers. You mentioned including a drawing that
contained layers within the file. Was that attached to the email? I didn't
see it.
Message 12 of 12

Never mind! I found the file. Thanks a bunch, Keith! This was super helpful!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost