![]() |
【转帖】exception in materializefile loading dwf file
exception in materializefile loading dwf file
exception in materializefile loading dwf file i am getting an exception thrown from: dwfreader:wfreader::materializefile dwfimporter::loadpackage dwfimporter::import from a very simple dwf file attached below. does anyone have any ideas? my calling code follows: oddwfimportptr importer = createimporter(); if (!importer.isnull()) { m_pdb = svcs.createdatabase(); importer->properties()->putat( "database", m_pdb ); importer->properties()->putat( "dwfpath", odrxvariantvalue( odstring(cadfilename.c_str()) ) ); importer->properties()->putat( "password", odrxvariantvalue( odstring("") ) ); importer->properties()->putat( "paperwidth", odrxvariantvalue( 297. ) ); importer->properties()->putat( "paperheight", odrxvariantvalue( 210. ) ); importer->import(); } i have a valid path "c:\\autocad\\dan2.dwf". attached files i cannot reproduce the error. what dd version do you use? can you import the file in odamfcapp? are you sure you pass correct file name? vladimir error building odamfc app i am getting the following errors trying to build odamfcapp with the latest version of dd: link : warning lnk4199: /delayload:oleacc.dll ignored; no imports found from oleacc.dll windirectx.lib(exgidirectxgeometry.obj) : error lnk2001: unresolved external symbol "public: virtual void __thiscall odgigeometrysimplifier:olylineout(long,long const *)" (?polylineout@odgigeometrysimplifier@@uaexjpbj@z) ../../../../../exe/vc2003/release/odamfcapp.exe : fatal error lnk1120: 1 unresolved externals build log was saved at "file://c:\devtools\opendesign\projectfiles\win32\msvc2003 \examples\odamfcapp\release\buildlog.htm" odamfcapp - 2 error(s), 2 warning(s) did you try to rebuild windirectx project? vladimir odamfcapp doesn't support dwf files you were correct, i had mismatches between the odamfcapp and windirectx projects, thanks. odamfcapp, however looks like it only supports dwg and dxf files. is there another project that i should try? or, where in odamfcapp should i go? thanks, dan select "file/new","file/import dwf.." vladimir but where does the dwf file actually get read ok, the mfc app works, but... i am lost. i tried to debug through the code through onimportdwf() and executecommand(), but i can't find the code that loads the dwf file. can anyone point me in the right direction? importing code entry point is in \imports\dwfimport\source\dwfimportimpl.cpp,291 see dwfimportcommand::execute you may try to make some sample reproducing you problem and post it here. (modify existing sample perhaps) vladimir i can't figure this out if i import a 4.2 or 5.5 dwf file everything works just fine, but the 6.0 versions do not work for binary or ascii. exception: class dwfresult::enum i cannot set breakpoints in \imports\dwfimport\source\dwfimportimpl.cpp when running odamfcapp to see why it works. i cannot step into dwfreader::materializefile to see why it fails. i am running borland builder 6 wm for my project which fails and microsoft vs 2003.net for the odamfcapp that works. you mean materializefile throws dwfresult::enum? what value? vladimir the exception value is -15 temp file error the exception value is -15 temp file error. it means that dwf toolkit could not create temporary file within the temporary directory you may try to change %temp% environment variable to something simple, like "c:\temp", and see if anything gets created there. vladimir directory created with no files a dwf0 directory was created, but there is nothing in it. the trouble is that we cannot builld a sampe with debug libraries with borland. it is caused by known limitation of their linker - it crashes whed debug info size exceeds ~32mb. the problem seem to be in _tempnam or _wmkdir difference in borland and ms runtime. vladimir does this mean you have reproduced the problem? does this mean you have reproduced the problem? will you have time to debug this the old fasioned way? if not, is there any way you can send me the borland project, and code to debug myself? this is a port of autodesk's code, right? so it shouldn't be too much of a trade secret. i would be perfectly willing to sign any agreement necessary. |
所有的时间均为北京时间。 现在的时间是 10:38 AM. |