Can I get property of entity?

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
rootshell
Posts: 1
Joined: 20 Sep 2007, 12:53

Can I get property of entity?

Post by rootshell » 20 Sep 2007, 12:58

Sorry I don't speak english very well

My Question is "How get property of Entity?"

Click Left Mouse button On the entity or object -> Get property in entity or object

if can that, i will buy your control...

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 24 Sep 2007, 10:09

Hello!

There are two ways:
<ul><li>usage of a tree view;</li>
<li>by code.</li></ul>
Usage of a tree view:
<ul><li>run demo <b>Viewer</b> in the ..\cadimportnet\bin\.. folder of the CAD Import .NET package (available at: http://www.cadsofttools.com/download/cadimportnet.zip);</li>
<li>open CAD necessary file;</li>
<li>select <b>View > Show entities panel</b> menu item;</li>
<li>select entity in the tree view to view its properties</li></ul>

by code:

Code: Select all

<font color="blue">private void</font id="blue"> btnGetEntities_Click(<font color="blue">object</font id="blue"> sender, System.EventArgs e)
{
	<font color="blue">if</font id="blue"> (FCADImage == <font color="blue">null</font id="blue">)
		<font color="blue">return</font id="blue">;
	<font color="blue">for</font id="blue"> (<font color="blue">int</font id="blue"> i = 0; i < FCADImage.Layouts[0].Converter.Entities.Count; i++)
	{
		CADEntity entEntity = (CADEntity)FCADImage.Layouts[0].Converter.Entities[i];			
		<font color="green">//get properties of entEntity</font id="green">
	}
}
Sergey.


Please post questions to the forum or write to support@cadsofttools.com

Post Reply