CAD drawing aligned dimension parameter (com interface)

The main use of Function:

_DMxDrawX::DrawDimAligned

Draw a label alignment. Details are as follows:

parameter Explanation

DOUBLE dExtLine1PointX

The first line starting point value X

DOUBLE dExtLine1PointY

The first line start point Y value

DOUBLE dExtLine2PointX

The second line starting point value X

DOUBLE dExtLine2PointY

The second line start point Y value

DOUBLE dTextPositionX

Defining points used to specify the dimension line labeled X value position

DOUBLE dTextPositionY

Specify the location denoted by dimension line is defined using the value of point Y

Implemented in C # code description:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

private void DrawDimAligned()

{

    axMxDrawX1.AddDimStyle("MyDimStyle""41,0.18,141,0.09,40,200""77,1,271,3""""");

    axMxDrawX1.DimStyle = "MyDimStyle";

    //把颜色改回黑白色

    axMxDrawX1.DrawCADColorIndex = 0;

    //把线型改成实线

    axMxDrawX1.LineType = "";

    //设置线宽 4

    axMxDrawX1.LineWidth = 0;

    //绘制一个对齐标注

    //参数一为第一条界线开始点X值,参数二为 第一条界线开始点Y值

    //参数三为第二条界线开始点X值

    //参数四为第二条界线开始点Y值

    //参数五为标注使用的指定标注线位置的定义点X值

    //参数六为标注使用的指定标注线位置的定义点Y值

    axMxDrawX1.DrawDimAligned(0, 40, 3, 45, 15, 46);

    //把所有的实体都放到当前显示视区

    axMxDrawX1.ZoomAll();

    //更新视区显示

    axMxDrawX1.UpdateDisplay();

}

Show results:

Draw aligned dimension by clicking a button, trigger DrawDimAligned () event, CAD controls the viewport display to set a good alignment mark in C #. As shown below:

c#drawdim5.png

Guess you like

Origin blog.csdn.net/u013725001/article/details/93469400