查看单个帖子
旧 2009-05-07, 06:41 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】wblockcloneobjects Problem

wblockcloneobjects problem
wblockcloneobjects problem
when i use wblockcloneobjects to copy some entities to another dwg, these is a crash happened.
pdb->wblockcloneobjects( ids, pdbother->getmodelspaceid(), *pmapping, oddb::kdrcreplace );
so i decide to clone each object except the error entity:
for(unsigned j=0; j<ids.size(); j++ )
{
oddbobjectidarray oneid;
oneid.push_back( ids[j] );
try
{
pdb->wblockcloneobjects( oneid, pdbsub->getmodelspaceid(), *pmapping, oddb::kdrcreplace );
}
catch (oderror& e)
{
cerr << "dwgdirect error: " << e.description() << endl;
}
catch(...)
{
cerr << "unknown error." << endl;
}
}
but there is still error happened when chlone each entity:
dwgdirect error: no active transactions
how can i do?
cloning transaction somehow gets aborted twice.
you may subscribe to rxevents, such as begindeepclone, beginwblockobjects, begindeepclonexlation, enddeepclone, abortdeepclone
, and dump id map at each step to see what's happening.
you may also turn on c++ exception interception, and post here a call stack of the point where first exception is thrown.
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)