Is the object which you are attaching the
extension dictionary to, open for write?
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
wrote in message news:5252809@discussion.autodesk.com...
Hi all,
Please, can somebody tell me what is the problem with creating Xrecord in my following code:
Database db = HostApplicationServices.WorkingDatabase;
Transaction trans = db.TransactionManager.StartTransaction();
Xrecord XRec= new Xrecord();
XRec.Data=new ResultBuffer(
new TypedValue((int)DxfCode.Text,this.dsidtxt.Text),
new TypedValue((int)DxfCode.Text,this.tpcmb.Text),
new TypedValue((int)DxfCode.Text,this.catcmb.Text),
new TypedValue((int)DxfCode.Text,this.stcmb.Text));
this.entity.CreateExtensionDictionary();
DBDictionary extDict=(DBDictionary)trans.GetObject(this.entity.ExtensionDictionary,OpenMode.ForWrite,false);
extDict.SetAt("MyData");
trans.AddNewlyCreatedDBObject(XRec,true);
trans.Dispose();
the error which it gives me is:
INTERNAL ERROR: !dbobji.cpp@6266: eNotOpenForWrite
I am using Autocad 2006,VS2003,C#.
Thanks in advanc.
Noora