![]() |
【转帖】odwriteex in borland builder6
odwriteex in borland builder6
odwriteex in borland builder6 i'm new to dwgdirect and am trying to learn about it. i need to create dwg/dxf files so i decided to compile and run the test app odwriteex. i have done this successfully ( as a console app ), unfortunately when i run the app it gives the following output load completed------------------------ audit : ok. error :invalid input press return to exit... the following line throws an exception - pdb->writefile(&fb, filetype, outver, true /* save preview */); the error string associated with the exception is "invalid input". any help would be appreciated. (my compiler is borland c++ builder 6 , running on xp sp2) i've found the answer in the dwgdirect reference faq replace : pdb->writefile(&fb, filetype, outver, true /* save preview */); with: if (filetype==oddb::kdxf) { pdb->writefile(&fb, oddb::kdxf, oddb::vac18, true /* save preview */); } else { pdb->writefile(&fb, oddb::kdwg, oddb::vac18, true /* save preview */); }; note that the outver variable cause a problem as well as the filetype. if anyone is interested... the borland compiler has an option "treat enum types as ints" which is unset by default. if you set this option then if fixes the problem described in this thread. it's probably a good idea to set it when compiling any of the example projects in borland builder? dwgdirect uses the default setting for this option, and according to the borland docs if you don't specify anything it is equivalent to -b (treat enums as ints). dwgdirect client applications should use this same setting, and avoid the use of -b- which forces enums to bytes when possible. |
所有的时间均为北京时间。 现在的时间是 04:34 AM. |