CAD绘制圆形云线批注(网页版)

【CAD绘制圆形云线批注(网页版)】贵有恒,何必三更起、五更眠、最无益,只怕一日曝、十日寒。这篇文章主要讲述CAD绘制圆形云线批注(网页版)相关的知识,希望能为你提供帮助。


js中实现代码说明:

function DoCloudCircleCommentFix()

var comment = mxOcx.NewEntity("IMxDrawComment");

comment.Text = "固定参数绘圆形云线标注";

comment.TextHeight = 50;

var frstPt = mxOcx.NewPoint();

frstPt.x = -200;

frstPt.y = -200;

var basepos = mxOcx.NewPoint();

basepos.x = 0;

basepos.y = 10;

var pos = mxOcx.NewPoint();

pos.x = 200;

pos.y = 300;

//基点

comment.BasePoint = basepos;

//位置

comment.Position = pos;

//标注位置提示多边形的半径

comment.ShapRadius = 50;

//标注框类型

comment.BoundingBoxType = 5;

//标注箭头类型

comment.ArrowType = 2;

var points = mxOcx.NewComObject("IMxDrawPoints");

points.Add2(frstPt);

points.Add2(basepos);

//标注框坐标数据

comment.Bounding = points;

var comobj = mxOcx.ObjectIdToObject(mxOcx.DrawEntity(comment));

comobj.TextStyle = "MyCommentFont";

mxOcx.ZoomAll();


效果展示:
通过点击绘制圆形云线标注按钮,触发DoCloudCircleCommentFix()事件,CAD控件视区将显示在js中设置好的圆形云线标注。如下图所示:


    推荐阅读