CAD得到曲线的长度(网页版)

主要用到函数说明:

IMxDrawCurve::GetLength2

返回曲线长度

 js代码得到曲线长度实现如下:

    function GetCLength() {
        var ent = mxOcx.GetEntity("选择曲线:");
        if (ent == null)
            return;
     
        var curve;
        if (ent.ObjectName == "McDbSpline")
        {
            curve =ent;
        }
        else
        {
            alert("实体类型不对");
            return;
        }
        var curvelen = curve.GetLength2();
     
        alert(curvelen);
 
    }

 

posted on 2019-07-03 13:59  梦想CAD控件  阅读(320)  评论(0)    收藏  举报

导航