TheSwamp
Code Red => .NET => Topic started by: Peter Guappa on March 16, 2014, 04:22:20 PM
-
Hi all,
How can I get the entity type in C# (block - arc - line - ....) when hovering over an entity?
If it is a block, how can I get the block name?
Thx.
-
Have you read this ?
http://adndevblog.typepad.com/autocad/2014/02/detecting-entities-under-cursor-while-selection-is-running.html
-
This article may helps too
http://through-the-interface.typepad.com/through_the_interface/2009/07/providing-information-on-autocad-objects-in-a-tooltip-using-net.html
-
Thanks Oleg,
I came back to add that one :)
-
Thx guys!
-
I'm stuck. My C# knowledge is almost nil.
I can get the entity type by using "id.ObjectClass.Name"
But how can I get the block name?
if (id.ObjectClass.Name == "AcDbBlockReference")
{ ......
-
got it
-
Don't forget about the dynamic block instances.