www.mxdraw.com
|
得到自定义实体外包事件回调函数指针
[id(241) , helpstring("property ImpGetGeomExtentsFun"), hidden, nonbrowsable]
IDispatch* ImpGetGeomExtentsFun;
例如: JS 代码
function GetGeomExtentsFun(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); } }