.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create layer key for MEP via C#

3 REPLIES 3
Reply
Message 1 of 4
rdswords
332 Views, 3 Replies

Create layer key for MEP via C#

How can I programatically create a layer key in MEP/ABS (or anything similar)? The big picture here is that I am going to take a csv file exported from Excel and then use it to generate layer keys (with corresponding layers) in MEP as a batch process. The problem is in finding the right method or methods in the API to create layer keys. Can someone point me in the right direction?
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: rdswords

// set layer
String strLayerKey = obj.LayerKey;
DictionaryLayerKeyStyle dicLayerKey = new DictionaryLayerKeyStyle(db);
obj.LayerId = dicLayerKey.GenerateLayer(strLayerKey);

obj is a duct, pipe, fitting, mvpart etc.
hope this helps.

wrote in message news:5674825@discussion.autodesk.com...
How can I programatically create a layer key in MEP/ABS (or anything
similar)? The big picture here is that I am going to take a csv file
exported from Excel and then use it to generate layer keys (with
corresponding layers) in MEP as a batch process. The problem is in finding
the right method or methods in the API to create layer keys. Can someone
point me in the right direction?
Message 3 of 4
Anonymous
in reply to: rdswords

After looking at your post again, I realize now that you were asking how to
create the layer key, not a layer from a key. Sorry.

"Gregory Hoyt" wrote in message
news:5674860@discussion.autodesk.com...
// set layer
String strLayerKey = obj.LayerKey;
DictionaryLayerKeyStyle dicLayerKey = new DictionaryLayerKeyStyle(db);
obj.LayerId = dicLayerKey.GenerateLayer(strLayerKey);

obj is a duct, pipe, fitting, mvpart etc.
hope this helps.

wrote in message news:5674825@discussion.autodesk.com...
How can I programatically create a layer key in MEP/ABS (or anything
similar)? The big picture here is that I am going to take a csv file
exported from Excel and then use it to generate layer keys (with
corresponding layers) in MEP as a batch process. The problem is in finding
the right method or methods in the API to create layer keys. Can someone
point me in the right direction?
Message 4 of 4
rdswords
in reply to: rdswords

Yeah, you had me quite confused for a second 🙂
So does anyone have any advice?

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost