几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】odwriteex assertion failed (http://www.dimcax.com/hust/showthread.php?t=17780)

yang686526 2009-05-06 09:15 PM

【转帖】odwriteex assertion failed
 
odwriteex: assertion failed
odwriteex: assertion failed
the example odwriteex fails with the following error:
assertion failed: database()->appservices()->patternmanager()->retrievepattern(m_patterntype, m_strname, database()->getmeasurement(), m_hatchdeflinelist) == eok, file source\database\entities\dbhatch.cpp, line 4191
i'm using visual studio 6. the error occurs both with debug and release versions.
any hints?
alfredo
i did find a possible solution to the problem. i'm using visual studio .net 2003 now. now only a warning remains in "audit report.txt":
acdbhatch(1ba) no hatch pattern definition invalid ignored
565 objects audited
total errors found 1 fixed 0
by the way, i'm using version 1.10 of dwgdirect.
to create valid hatch entity dd needs to have access to patten definition. pattern manager class can be customized to allow storing patterns as you like (in separate file, in resources etc.)
default implementation of pattern manager loads predefined patterns from file acad.pat or acadiso.pat depending on drawing's measurement.
findfile() is called to locate file with pattern definition. default implementation of findfile() searches pattern in paths specified in "acad" environment variable.
so to make odwriteex working as is (without code modification) specify acad environmernt variable to point to location of acad.pat file (autocad's /support folder)
sergey slezkin
thanks for that hint. it does work now without any errors.

who has example of customed class of dd1.0
who has some customed class examples of odhatchpatternmanager to show
thanks very mush!


所有的时间均为北京时间。 现在的时间是 11:32 PM.