Vertical dimension bug

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Sing
Posts: 48
Joined: 12 Apr 2020, 17:39

Vertical dimension bug

Post by Sing » 15 Nov 2021, 12:30

Hello

I got a vertical CADDimension issue.

After creating a vertical dimension line, save it as a '.dwg' file and open it. However, if you edit one point on the dimension line, the dimension line itself is crushed.

I tried setting it in various ways and cloning the previously created vertical dimension line in Autocad LT 2020, saved it as a '.dwg' file and then, opened it, but the symptoms were the same.

Code: Select all

CADDimension dimension = new CADDimension()

dimension.DefPoint = new DPoint(5000, 5000, 0);
dimension.LinDefPoint1 = new DPoint(0, 0, 0);
dimension.LinDefPoint2 = new DPoint(0, 10000, 0);
dimensionH.Layer = vLayer;
cadImage.Converter.Loads(dimensionH);
cadImage.Layouts[0].AddEntity(dimensionH);
Please check the below video URL.
https://youtu.be/2x0cTNh2C54

Can you let me know if you know the correct code for vertical CADDimension?

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

Re: Vertical dimension bug

Post by support » 16 Nov 2021, 21:39

Hello Sing,

Please try to use the following code for creating a vertical dimension:

Code: Select all

CADDimension dimension = new CADDimension(CADDimension.DimensionType.Rotated, new DPoint(0, 0, 0), new DPoint(0, 10000, 0), 5000, true)
{
    Style = cadImage.Converter.DimensionStyleByName("DimStyle1"),
    Layer = cadImage.Converter.LayerByName("Dimensions")
};
cadImage.Converter.Loads(dimension);
cadImage.Layouts[0].AddEntity(dimension);
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Sing
Posts: 48
Joined: 12 Apr 2020, 17:39

Re: Vertical dimension bug

Post by Sing » 18 Nov 2021, 13:22

Hello Mikhail

Thank you so much. It works very well. :)

Post Reply