![]() |
【转帖】inserting block
inserting block
inserting block hello ! i want to insert a specific block from a database to another. here is my code : code: oddbdatabaseptr pexportdb; oddbblocktableptr pdesttable; oddb::measurementvalue measure = oddb::kmetric; pexportdb = createdatabase(true, measure); pdesttable = pexportdb->getblocktableid().openobject(oddb::kforwrite); oddbblocktableptr pactualdbtable = m_pdb->getblocktableid().openobject(oddb::kforread); oddbsymboltableiteratorptr pactualdbti = pactualdbtable->newiterator(true, true); while( !pactualdbti->done() ) { oddbblocktablerecordptr pactualblock = pactualdbti->getrecord(); if( !pactualblock->islayout() && !pactualblock->isanonymous() && !pactualblock->isfromexternalreference() ) { odstring blockname = pactualblock->getname(); if( pdesttable->has( blockname ) == false && blockname=="general surgery or light") { pexportdb->insert(blockname, blockname, m_pdb, true); } } pactualdbti->step(); } the program doesn't crash, but i get an "first-chance exception error" and when i look at my destination database, i have a block (with the same name of the one i wanted to copy - this is good), but empty ! do you have an idea of where this error could come from ? thank you very much for your help ! cnice it appears to be a dd bug described in it will be fixed in the next maintenance release (1.14.03) regards, sergey vishnevetsky |
所有的时间均为北京时间。 现在的时间是 04:14 AM. |