CAD绘制圆形云线批注(网页版)
Posted lihao2014
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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中设置好的圆形云线标注。如下图所示:
以上是关于CAD绘制圆形云线批注(网页版)的主要内容,如果未能解决你的问题,请参考以下文章