Draw an angular dimension CAD parameter (com interface)

The main use of Function:

_DMxDrawX::DrawDimAngular

Draw a angular dimension. Details are as follows:

parameter Explanation

DOUBLE dAngleVertexX

The value of the angle vertex marked X

DOUBLE dAngleVertexY

Y value of the angle vertex marked

DOUBLE dFirstEndPointX

The angle denoted by a reference line of the first point value X

DOUBLE dFirstEndPointY

A first angular dimension of the reference point Y value line

DOUBLE dSecondEndPointX

The second angular dimension values ​​of the reference point X line

DOUBLE dSecondEndPointY

The second angular dimension values ​​of the reference point Y line

DOUBLE dTextPointX

Text Position Point X value

DOUBLE dTextPointY

Character position 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 DrawDimAngular()

{

    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值

    //参数七为文字位置点X值,参数八为文字位置点Y值

    axMxDrawX1.DrawDimAngular(500, 5000, 0, 5500, 1000, 5500, 500, 5500);

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

    axMxDrawX1.ZoomAll();

    //更新视区显示

    axMxDrawX1.UpdateDisplay();

}

Show results:

Marked by clicking on the drawing angle button to trigger DrawDimAngular () event, CAD controls the viewport display to set a good angular dimensions in C #. As shown below:

c#drawdim4.png

Guess you like

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