.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Current Layer Name
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
138 Views, 3 Replies
01-03-2013 03:44 AM
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.
Re: Current Layer Name
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-03-2013 03:59 AM in reply to:
spu
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 -
-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Re: Current Layer Name
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-03-2013 04:45 AM in reply to:
spu
If you want to give just current layer name try this code as well
[CommandMethod("curlayer")]
public void DisplayCurrLayerName()
{
MessageBox.Show(Autodesk.AutoCAD.ApplicationServic es.Application.GetSystemVariable("clayer").ToStrin g());
}
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
C6309D9E0751D165D0934D0621DFF27919
Re: Current Layer Name
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-06-2013 12:51 AM in reply to:
Hallex
Hi,
Both solutions where perfect...
Thanks
Regards,
Shijith
