![]() |
【转帖】use Predefined Hatchpatterns
use predefined hatchpatterns
use predefined hatch patterns hello, i want to create hatches and set predefined patterns. when i set solid it works fine, but all other predefined patterns doesn't work. i know, that opendwg like to open .pat-files for the definitions, but i can't use this in our programm (and i don't like do redefine them, too). i call setdatabasedefaults (null) to prevent that. when i open the created dwg-file with autocad and i don't see the created hatches, but singledoc and odamfcapp show them. if i save the file with odamfcapp or singledoc once, i could see them at autocad, too. how could i create the hatches on the rigth way? last edited by math; 24th january 2006 at 07:19 amfff">. when dwgdirect needs a .pat file, it call the oddbhostappservices::findfile. you can override this virtual function and use your own path. can this help your problem? or you don't want to use .pat files at all? best regards chudomir i afraid, i know what happend. the example applications find the pat-files, because there is an autocad at my computer. well i don't like to use pat-files at all, but i afraid it's the only solution for my problem. ... and my config-file grows and grows.... i know that! : ) our configurations grow constantly too... btw you can have your own formats for hatch patterns and convert them to pat files only temporarily, but that's not a reasonable solution... best regards chudomir hi, well, you can't reduce amount of information necessary for your program, you either put an information in resource file or hardcode it into the code... what about hatch patterns, you can append pattern definition to pattern manager object via odhatchpatternmanager::appendpattern(); to access pattern manager call oddbhostappservices::patternmanager(). odwriteex sample contains code to append a pattern to pattern manager without .pat file - see "my_stars" pattern. where is also a method to avoid using pattern manager at all. see setpattern() method accepting not only name but all pattern parameters. sergey slezkin |
| 所有的时间均为北京时间。 现在的时间是 03:47 AM. |