|
www.mxdraw.com
|
得到自定义实体夹点事件回调函数指针
[id(243) , helpstring("property ImpGetGripPointsFun"), hidden, nonbrowsable]
IDispatch* ImpGetGripPointsFun;例如: JS
function GetGripPointsFun(pCustomEntity) {
var sGuid = pCustomEntity.Guid;
if (sGuid == "TestMxCustomEntity") {
if (!pCustomEntity.IsHave("ept"))
return;
var stp = pCustomEntity.GetPoint("spt");
if (stp == null)
return;
var ept = pCustomEntity.GetPoint("ept");
if (ept == null)
return;
var ret = mxOcx.NewResbuf();
ret.AddPoint(stp);
ret.AddPoint(ept);
mxOcx.SetEventRetEx(ret);
}
}