www.mxdraw.com
|
返回新添加到数据库的对象.。
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();