using (DocumentLock docLock = doc.LockDocument())
                            {
                                    using (Transaction trans = db.TransactionManager.StartTransaction())
                                    {
                                        ObjectId obi = StringToObject(layList[fitIdxS[ii][1]][5]);
                                        Entity ent = (Entity)obi.GetObject(OpenMode.ForWrite);//
                                        ent.ColorIndex = 1;
                                        //ent.Linetype = _lineType_std[2];
                                        trans.Commit();
                                    }
                                }
                            }
从ACAD移植一个项目,上面那句从元素ID获取元素报错:尝试读取或写入受保护的内存。
我的问题是:1-ZCAD支持从ID号获取元素吗?2-如何从ID获取元素来操作?
感谢!






















