CAD drawing line labeling parameters (com interface)

The main use of Function:

_DMxDrawX::DrawDimRotated

Draw a line labeling. Details are as follows:

parameter Explanation

DOUBLE dExtLine1PointX

Starting point X values ​​of the input line of the first

DOUBLE dExtLine1PointY

Enter the starting point of the first boundary value Y

DOUBLE dExtLine2PointX

X values ​​of the input start point of the second line

DOUBLE dExtLine2PointY

Starting values ​​of the input Y of the second line

DOUBLE dDimLineLocationX

Input point marked X value of the line itself

DOUBLE dDimLineLocationY

Input point on the Y value denoted by the line itself

DOUBLE dRotationAngle

Input rotation angle marked

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 DrawDimRotated()

{

    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.DrawDimRotated(0, 70, 50, 70, 25, 71, 0);

    axMxDrawX1.DrawDimRotated(0, 72, 0, 74, 15, 73, 0.771);

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

    axMxDrawX1.ZoomAll();

    //更新视区显示

axMxDrawX1.UpdateDisplay();

  

}

Show results:

Draw line marked by clicking a button, trigger DrawDimRotated () event, CAD controls the viewport display to set a good line labeling in C #. As shown below:

c#drawdim1.png

Guess you like

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