www.mxdraw.com
内容索引主面
前一个向上下一个
MxDrawXCustomFunction::Mx_GetEntitysNewAddCmd 方法

返回新添加到数据库的对象.。

IDL
static BOOL Mx_GetEntitysNewAddCmd(McDbObjectIdArray& aryId);

例如:

       MainCAD.SendStringToExecute(cmdTimer.Tag.ToString());

     //取最后一条线
     tmpParams = new MxDrawResbuf();
     tmpParams = (MxDrawResbuf)MainCAD.Call("Mx_GetEntitysNewAddCmd", "");
     MessageBox.Show("发现" + (tmpParams.Count -1).ToString() + "条记录");
     for (i = 1; i < tmpParams.Count; i++)
     {
         tmpObjID = tmpParams.AtObjectId(i);
         if (tmpObjID == 0) continue;

         tmpEn = MainCAD.ObjectIdToObject(tmpObjID) as MxDrawEntity;
         tmpObjName = tmpEn.ObjectName;
         tmpEn.SetxDataString("NAME", 0, "线段" + i.ToString());
         tmpEn.colorIndex = MCAD_COLOR.mcGreen;
     }

     MainCAD.UpdateDisplay();
Copyright (c) 2010. All rights reserved.
你认为该帮助怎么样? 发送反馈信息!