查看单个帖子
旧 2009-05-04, 05:38 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)