How to access dimensions?
Moderators: SDS, support, admin
How to access dimensions?
Can you tell me how to get the actual numbers of the dimensions in a CAD image? I've seen how I can turn them on and off with CADImage.DimensionsVisible, but I want the actual values.
Or any other way to reliably get the physical sizes in a drawing?
Or any other way to reliably get the physical sizes in a drawing?
Hello!
The following code is based on <b>Viewer</b> demo:
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Or any other way to reliably get the physical sizes in a drawing?<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
It depends on what exactly you want to get. In the general case it is necessary to analyze <b>Box</b> parameter of the entity.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
The following code is based on <b>Viewer</b> demo:
Code: Select all
<font color="blue">private void</font id="blue"> btnGetDimensions_Click(<font color="blue">object</font id="blue"> sender, System.EventArgs e)
{
<font color="blue">if</font id="blue">(<font color="blue">this</font id="blue">.FCADImage == <font color="blue">null</font id="blue">) <font color="blue">return</font id="blue">;
<font color="blue">int</font id="blue"> DimNumber = 0;
<font color="blue">for</font id="blue">(<font color="blue">int</font id="blue"> i = 0; i < this.FCADImage.CurrentLayout.Count; i++)
{
<font color="blue">if</font id="blue"> (<font color="blue">this</font id="blue">.FCADImage.CurrentLayout.Entities[i] <font color="blue">is</font id="blue"> CADDimension)
DimNumber++;
}
MessageBox.Show(<font color="blue">string</font id="blue">.Format("Dimensions number is - {0}", DimNumber));
}
It depends on what exactly you want to get. In the general case it is necessary to analyze <b>Box</b> parameter of the entity.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com