Page 1 of 1

Vertical dimension bug

Posted: 15 Nov 2021, 12:30
by Sing
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?

Re: Vertical dimension bug

Posted: 16 Nov 2021, 21:39
by support
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

Re: Vertical dimension bug

Posted: 18 Nov 2021, 13:22
by Sing
Hello Mikhail

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