![]() |
【转帖】救命:命名对象词典可以储存实体,可怎么老是出错????
救命:命名对象词典可以储存实体,可怎么老是出错????
www.dimcax.com 救命:命名对象词典可以储存实体,可怎么老是出错???? 版主及各位大侠: 本人遇到了严重而长期苦恼的问题:命名对象词典可以储存实体,可怎么老是出错????以下是代码:主要功能就是将实体保存到词典(而不是保存到块表纪录) public sub saveent(byval dbase as database, optional byval visible as boolean = false) dim trs as transaction = dbase.transactionmanager.starttransaction dim dbdict as dbdictionary = trs.getobject(dbase.namedobjectsdictionaryid, openmode.forwrite) '--数据库词典 dim dict as dbdictionary if dbdict.contains("dict") = true then dict = trs.getobject(dbdict.getat("dict"), openmode.forwrite) '--获得指定词典 else lfdict = new dbdictionary '--如果没有找到,则新建一个词典 dbdict.setat("dict", dict) trs.addnewlycreateddbobject(dict, true) end if dim tent as entity = new line(new point3d(0, 0, 0), new point3d(1 |
| 所有的时间均为北京时间。 现在的时间是 06:58 AM. |