Hello Mikhail
Your code helped me a lot.( viewtopic.php?f=15&t=10574 )
However, I'd like to know how to create different cases of CADDimension such as diagonal, arc and etc.
Can you provide some example codes for them?
The 'Help' document is not enough for me to understand CADDimension.
Thank you
CADDimension Examples
Moderators: SDS, support, admin
Re: CADDimension Examples
Hello,
Thank you for your great question.
Here is an example of creating a diaginal dimension:
At the moment CAD .NET supports creating only linear dimensions. In the future we hope to be able to add support for more dimension types.
Maria
Thank you for your great question.
Here is an example of creating a diaginal dimension:
Code: Select all
CADDimension dimension = new CADDimension(CADDimension.DimensionType.Aligned, new DPoint(0, 0, 0), new DPoint(-7071, -7071, 0), 5000, true)
{
DefPoint = new DPoint(-3535, 10606, 0),
Style = cadImage.Converter.DimensionStyleByName("DimStyle1"),
Layer = cadImage.Converter.LayerByName("Dimensions")
};
cadImage.Converter.Loads(dimension);
cadImage.Layouts[0].AddEntity(dimension);
Maria
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: CADDimension Examples
Hello Mikhail
Thank you for your code.
However, the dimension is broken down when moving a line.
The symptom is the same as the old post.
(viewtopic.php?f=15&t=10574)
Maybe you missed something.
Please check it again.
Thank you.
Thank you for your code.
However, the dimension is broken down when moving a line.
The symptom is the same as the old post.
(viewtopic.php?f=15&t=10574)
Maybe you missed something.
Please check it again.
Thank you.
Re: CADDimension Examples
Hello Sing,
You are welcome.
As you may know, a diagonal dimension is an Aligned Dimension object in terms of AutoCAD. The problem is that the given code creates a Rotated Dimension object (CADDimension.Flags = 160). We are currently investigating this problem.
Mikhail
You are welcome.
As you may know, a diagonal dimension is an Aligned Dimension object in terms of AutoCAD. The problem is that the given code creates a Rotated Dimension object (CADDimension.Flags = 160). We are currently investigating this problem.
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: CADDimension Examples
Hello, Thank you for your great question. Here is an example of creating a diaginal dimension: Code: Select all CADDimension dimension = new ... In CAD, dimension cps tester styles (DimStyles) automate the appearance of dimensions ... In our example, we'll be creating a new DimStyle based on the ...Concept: This tutorial will explain the different types of dimensions which are commonly used in AutoCAD and help you understand their differences.Draws a Line Dimension. Click a line. Draws a Rectangle Dimension. Click a side of a rectangle. Draws the Diameter and Radius Dimension for Circles and Arcs.