Skip to content

Add Aligned Dimension with text above the dimension line and how to increase text size? #189

@git1510

Description

@git1510

hello, I am new in Dxf and also new with this library. I have tried to draw aligned dimension as below code but dimension text plot in center of line.

public void TestDimension()
        {
		DxfFile file =  new DxfFile();
            file.Clear();
            file.Header.Version = DxfAcadVersion.R2018;
            //file.Header.TextAboveDimensionLine = true; // Not Working
            //file.Header.DimensioningTextHeight = 20; // Not Working
            // file.Header.DimensionTextJustification = DxfDimensionTextJustification.AboveLineCenter; // Not Working

            DxfLine dxfLine = new DxfLine(new DxfPoint(0, 5, 0.0), new DxfPoint(10, 5, 0.0));
            file.Entities.Add(dxfLine);

            DxfAlignedDimension dxfAligned = new DxfAlignedDimension();
            dxfAligned.DefinitionPoint1 = dxfLine.P1+ new DxfPoint(0, 5, 0.0); // distance
            dxfAligned.DefinitionPoint2 = dxfLine.P1; // point 1
            dxfAligned.DefinitionPoint3 = dxfLine.P2; // pont 2
            dxfAligned.Text = "Demo Aligned Dimension";
            file.Entities.Add(dxfAligned);

            // save file
            file.SaveDxfFile();
        }

Please correct if i am wrong in above code and please help me for below points:
1. Text above dimension line
2. Increase dimension text hight
3. How to drawing DataTable (by using DxfDataTable)
4. How to drawing center line

Please make example of above points that's good for me and another developer also.
Thanks in advance for your helping hands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions