www.mxdraw.com
|
得到实体所在组
static bool Mx_GetGroupForEntity(McDbObjectId id, std::vector<CString>& vecGrounName);
参数 |
说明 |
McDbObjectId id |
实体id |
std::vector<CString>& vecGrounName |
返回组名数组,因为实体可以同时在多个组中 |
成功返回TRUE
例如: C#代码
MxDrawUtility mxUtility = new MxDrawUtility(); MxDrawPoint getPt; MxDrawEntity ent = mxUtility.GetEntity(out getPt, "选择实体"); if (ent == null) return; Int64 id = ent.ObjectID; ent.Close(); MxDrawResbuf param = new MxDrawResbuf(); param.AddObjectId(id); MxDrawResbuf ret = (MxDrawResbuf)axMxDrawX1.CallEx("Mx_GetGroupForEntity", param); if (ret.AtString(0) == "Ok") { for (int i = 1; i < ret.Count; i++) { MessageBox.Show(ret.AtString(i)); } }