CAD drawing diameter dimension parameter (com interface)

The main use of Function:

_DMxDrawX::DrawDimDiametric

Draw a diameter dimension. Details are as follows:

parameter Explanation

DOUBLE dChordPointX

The first point is marked on the X value curve

DOUBLE dChordPointY

The first point is marked on the Y value curve

DOUBLE dFarChordPointX

On the curve labeled second point value X, the diametrically opposite point chordPoint

DOUBLE dFarChordPointY

The second point on the Y value of the curve is marked, the diametrically opposite point chordPoint

DOUBLE dLeaderLength

Input arrows length

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

private void DrawDimDiametric()

{

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

    axMxDrawX1.DimStyle = "MyDimStyle";

    //把颜色改回黑白色

    axMxDrawX1.DrawCADColor = 0;

    //把线型改成实线

    axMxDrawX1.LineType = "";

    //设置线宽 4

    axMxDrawX1.LineWidth = 0;

    //绘制一个直径标注

    //参数一为在被标注的曲线上的第一个点X值 ,参数二为在被标注的曲线上的第一个点Y值

    //参数三为在被标注的曲线上的第二个点X值,这个点与chordPoint直径相对

    //参数四为在被标注的曲线上的第二个点Y值,这个点与chordPoint直径相对

    //参数五为输入箭头长度

    axMxDrawX1.DrawDimDiametric(50, 570, 60, 600, 100);

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

    axMxDrawX1.ZoomAll();

    //更新视区显示

    axMxDrawX1.UpdateDisplay();

}

Show results:

Draw diameter dimensions by clicking a button, trigger DrawDimDiametric () event, CAD controls the viewport display to set a good diameter dimensions in C #. As shown below:

c#drawdim3.png

Guess you like

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