几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】causing exception while saving hatch1 (http://www.dimcax.com/hust/showthread.php?t=15381)

yang686526 2009-05-04 05:38 PM

【转帖】causing exception while saving hatch1
 
causing exception while saving hatch!
causing exception while saving hatch!
i found that it causing exception while saving hatch. but it do not cause exception when i install autocad 2000 on my compter.
maybe it can find the "*.pat" file about the hatch when i installed autocad 2000.
the problem is that what should i do to make i can to save hatch when i do not install autocad 2000 on my computer. how can i to set the path of "*.pat",so it can find the "*.pat" files and it can initialize pattern manager.
thanks a lot.
zhang.
it seems that you use code form odamfcapp which searches the registry for installed autocad and uses it's files. as a result your program will work only if autocad is installed. more safe way is to provide *.pat file with your application and be sure that your override of oddbhostservices::findfile() is able to locate it.
but note that original autocad's .pat file is copyrighted and you may have legal problems redistributing it.
also where is a way to not use *.pat files at all. patterns can be created programmatically using hatchpatternmanager methods.
see odwriteex sample - creating my_stars pattern.
sergey slezkin


所有的时间均为北京时间。 现在的时间是 10:05 AM.