Layer Standard / Key Override

Layer Standard / Key Override

Anonymous
Not applicable
410 Views
3 Replies
Message 1 of 4

Layer Standard / Key Override

Anonymous
Not applicable

I'm kinda new to .net. Can someone give me an example of setting a layerkey override  I have found a couple of layer key examples. They are old enough I can't get them to work in ACA 2015.

 

Thanks in advance

Matthew

0 Likes
411 Views
3 Replies
Replies (3)
Message 2 of 4

smbrennan
Collaborator
Collaborator

You may find better replies by posting in the AutoCAD Customization forum. There's a sub forum specifically for .NET.

 

http://forums.autodesk.com/t5/net/bd-p/152

Shawn B.

      |   
To help improve Autodesk Products, please Click Here to Vote for ideas and submit your own.
0 Likes
Message 3 of 4

Keith.Brown
Advisor
Advisor

Any previous example that you find should work in the current version.  They have not changed anything specific about the AutoCAD Architecture or AutoCAD MEP API in recent releases.  They did however make a general change a few years ago when they added the core console.

 

Just make sure you are referencing the following DLL's and you should be ok.

 

accoremgd.dll

acdbmgd.dll

acmgd.dll

 

Those are the AutoCAD references that changed.  The AEC and AECB references will stay the same.  You might have to manipulate a couple of namespaces in order to get your code to work with the new dlls but as i mentioned before the actual code itself has not changed.

 

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

I'm not quite sure how to get that done.  I understand what you are saying.  Here is where I'm comming from.

I found this peice of VBA code for an older version of AutoCAD. 

 

http://forums.autodesk.com/t5/autodesk-architectural-desktop/help-with-my-adt-generate-layers-from-l...

 

I don't know how to convert it to .net for use in a 2015 version of AutoCAD. I'm also not quite sure how to make it work in my particular setup.  A few comments would help in the code but i'm sure it is going to take some time playing with it.

 

 

This is the section I would like to ba able to duplicate.

 

'set Layer Standard Wildcards
With LayKeyStyle.OverrideSettings
.Item("Discipline").Value = "?"
.Item("Status").Value = "-?"
.Item("Component").Value = "-????"
.Item("Description").Value = "-*"
End With

 

 

 

Thank you

Matthew

0 Likes