![]() |
【转帖】cant create a light in 1.14
can't create a light in 1.14
can't create a light in 1.14 i'm trying to create a odavelight using dwgdirect 1.14. i suspect i'm missing something, but i can't figure out what. the call to odavelight::createobject is throwing a "not initialized yet" exception. here's what i'm doing: odrx_declare_static_module_entry_point(odrecompute dimblockmodule); odrx_declare_static_module_entry_point(odavemodule impl); odrx_begin_static_module_map() odrx_define_static_application("recomputedimblock" , odrecomputedimblockmodule) odrx_define_static_application("dd_ave", odavemoduleimpl) odrx_end_static_module_map() odrxobjectimpl<acadservices> _svcs; int main(int argc, char ** argv) { oddbdatabaseptr pdb; oddbblocktablerecordptr pcurblock; odinitialize(&_svcs); odrx_init_static_module_map(); pdb = _svcs.createdatabase(); pcurblock = pdb->getmodelspaceid().openobject(oddb::kforwrite); try { odavelightptr plight = odavelight::createobject(); } catch (oderror& e) { printf("%s\n", e.description()); } catch (...) { printf("unknown error\n"); } oduninitialize(); return(0); } i have a visual c v6 project if anyone needs to see the whole thing, but i was not successful at uploading it. it's in a 2.3 mb zip file. any ideas what i might be doing wrong? thanks, tim first thing you missed is loading of ave module. from odaveex: code: /********************************************************************/ /* load the ave extensions. */ /********************************************************************/ { ::odrxdynamiclinker()->loadapp("dd_ave"); } sincerely yours, george udov thanks george, that was the missing piece. tim |
所有的时间均为北京时间。 现在的时间是 01:09 PM. |