![]() |
【转帖】change xdata in my dxf
change xdata in my dxf
change xdata in my dxf hi! on my search for a way to change xdata in my dxf i抳e come across 搊ddbentmod?as a possible way, i hope, i might be dead wrong about this! so to get some understanding of this i抳e looked at the odamfcapp and found this section: code: try { oddbentmod(m_pobjectid,m_presbuf); } catch( const oderror& ex ) { afxmessagebox(ex.description()); }when trying this in my own code i get the message box: 揘o interface? this exception is thrown if the passed in object cannot be opened in kforwrite mode. i can open in kforwrite mode the first time around but when i've changed data and comes back to below code section ( bedited = true ) i get my butt kicked. code: for (pblkiter->start(); ! pblkiter->done(); pblkiter->step()) { // open the block oddbblocktablerecordptr pblock = pblkiter->getrecordid().safeopenobject(); // get an entity iterator oddbobjectiteratorptr pentiter = pblock->newiterator(); // for each entity in the block for (; !pentiter->done(); pentiter->step()) { oddbobjectid id = pentiter->objectid(); pent = id.safeopenobject(oddb::kforwrite); odresbufptr podresbufptr = pent->xdata( "dxf_converter" ); if( !bedited ) { pent->setxdata( xiter ); } else { try { oddbentmod( id, podresbufptr); } catch( const oderror& ex ) { afxmessagebox(ex.description()); } } } } if anyone knows about this kind of problems ( change xdata ) then please give me a hint. and again, i might be barking up the wrong tree here in more then one way?. regards kennet no problem...sorry! i guess i was a bit too hasty sending in above question. now when i looked back at my 損roblem?it really was no problem, it seems. |
所有的时间均为北京时间。 现在的时间是 01:13 PM. |