Hi,
I know acCurDb.Clayer will give the ObjectId of active layer but friends how to get the current layer name.
This may be really silly but i had spent lot of time to find and can't get a good solution. Please help....
Regards,
Shijith
Solved! Go to Solution.
Solved by Hallex. Go to Solution.
Hi,
open the object for the ObjectID, that resulting type is a LayerTableRecord, and now you have access tp a property "Name" and that is the layername.
- alfred -
If you want to give just current layer name try this code as well
[CommandMethod("curlayer")] public void DisplayCurrLayerName() { MessageBox.Show(Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("clayer").ToString()); }
Can't find what you're looking for? Ask the community or share your knowledge.