高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|