在网页中如何得到样条线的,拟合点数据?
MxDraw网页开发|冯美娟|2019-12-26 14:45
-
回答:
js代码如下:
function GetFitPoints () { var ent = mxOcx.GetEntity("选择样条线"); if (ent == null) return; if (ent.ObjectName == "McDbSpline"){ var spl =ent; var fitPoints = spl.GetFitPoints(); for (var i = 0; i < fitPoints.Count; i++) { var pt = fitPoints.Item(i); alert(pt.x.toString() + "," + pt.y.toString()); } } }