几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-06, 03:56 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】insert fails

insert fails
insert fails
hi, all
what i want to do:
merge 2 dxf-files. one file is a drawing frame, the other one is a normal dxf drawing. it is given, that i have to put all entities of drawing into frame and store all as a new dxf-file.
executing the following code, i got an error on insert-command: r6025 (pure virtual function call). could it be a problem, that modelspace in drawing is called *model_space and in frame *model_space ? if yes, what can i do because this is given.
code:
odstaticrxobject<myservices> svcs;
odinitialize(&svcs);
odgsinitialize();
oddbdatabaseptr pdatabasedrawing = svcs.readfile( drawingfile, false, false, oda::ksharedenyno );
oddbdatabaseptr pdatabaseframe = svcs.readfile( framefile, false, false, oda::ksharedenyno );

//collect all entities for wblock
oddbobjectid blockid;
oddbobjectidarray idarray;
oddbblocktableptr pblocks = pdatabasedrawing->getblocktableid().safeopenobject();
oddbsymboltableiteratorptr pblkiter = pblocks->newiterator();
for (pblkiter->start(); (! pblkiter->done()) ; pblkiter->step() )
{
oddbblocktablerecordptr pblock = pblkiter->getrecordid().safeopenobject();
std::cout << pblock->getname() << std::endl;
oddbobjectiteratorptr pentiter = pblock->newiterator();
for (pentiter->start(); !pentiter->done(); pentiter->step())
{
idarray.push_back(pentiter->objectid());
}
}
//wblock
oddbdatabaseptr ptempdb;
ptempdb = pdatabasedrawing->wblock(idarray, odgepoint3d::korigin);
//insert
pdatabaseframe->insert( odgematrix3d::kidentity, ptempdb);
//write merged file
odwrfilebuf outfile("d:/merged.dxf");
pdatabasedrawing->writefile(&outfile, oddb::kdxf, oddb::vac15, false, 16);
pdatabasedrawing.release();
pdatabaseframe.release();
ptempdb.release();
odgsuninitialize();
hi,
could you please test your code inside one of our sample? mfcapp for example and publish here code and results. also information about used toolkit version and dll\lib toolkit will be very helpful.
and usually we asked our members test here code with last toolkit release.
hi
i'm using opendesign 2.05 and i execute my code within the sample ""odvectorizeex".
i have built an own class and i could already insert everything from frame into dxf-file. (but without wblocking).
at command insert: the error is an ms c++ error, it's not said which class, but only ....odvectorizeex.exe (r6025, pure virtual function call).
thank you.
hi,
i have tested your code with current sources state and with 2.5.1. i cannot reproduce the problem. so could you please test your code with another input file set? for example, create two new dwg files with only one line in model space. will it crash too? yes - try to download our last release and test once more with both file set. it is possible that defect was fixed since 2.05.
hi
thank you very much for your reply. i will try to get last release und try with other files and let you know whether it works.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】drawing that fails in reading in ver.2.2 yang686526 DirectDWG 0 2009-05-04 08:10 PM
【转帖】dd1.13 fails for given the file 3dpolyine with only one ver yang686526 DirectDWG 0 2009-05-04 07:06 PM
【转帖】dd1.10upd1 fails, odt doesnt fail yang686526 DirectDWG 0 2009-05-04 07:05 PM
【转帖】call to odinitialize90 fails yang686526 DirectDWG 0 2009-05-04 05:17 PM
【转帖】bug; odgsbasevectorizeviewdraw90 for 9this0 oddbbody fails yang686526 DirectDWG 0 2009-05-04 05:09 PM


所有的时间均为北京时间。 现在的时间是 06:15 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多