Request 4 C# sample code -Entities in named view
Posted: 26 Apr 2007, 00:39
Does anyone have some sample code on how they extracted all of the entities beloning to a named view?
CADSoftTools - AutoCAD DWG DXF HPGL (PLT) SVG CGM STEP IGES STL SAT viewers, converters and developer tools. Delphi and C# source code.
https://cadsofttools.com/forum/
Code: Select all
<font color="blue">private</font id="blue"> void btnGetEntities_Click(object 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++)
{
<font color="green">//get all entities on the <b>Model</b> layout</font id="green">
CADEntity entEntity = (CADEntity)FCADImage.Layouts[0].Converter.Entities[i];
<font color="green">//do your actions</font id="green">
}
}