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

yang686526 2009-05-04 03:16 PM

【转帖】a simple sdi viewer
 
a simple sdi viewer
a simple sdi viewer
environment: windows 2000, vc6
i wrote a dwg/dxf sdi viewer for purpose of study. i tried to write it as simple as possible. the only function is to open a dwg/dxf file and view it in sdi interface.
this application works fine, but has the following problems:
1. i cannot use one odgsdevice for every dwg/dxf database, i must create new odgsdevice for each opened dwg/dxf database, otherwise error will occur. to test this problem, in sdiviewerview.cpp, csdiviewerview::oninitialupdate(), comment out the following lines:
if(m_pdevice)
{
delete m_pdevice;
m_pdevice = null;
}
then error may occur after open dwg/dxf twice.
2. vc reports memory leak. maybe the problem is in diagnostics not in dwgdirect or my code, but i am not sure of it.
3. when open "8th floor hvac.dwg" in acad2004 sample folder, debug version reports "assertion failed", while release version works fine. this also happens in dd example odamfcapp and odamdiapp.
any help would be greatly appreciated.
ycf888
wht abt multiple reference file
consider ythe case when a dwg file with nested reference inside. ur application openes up a single file beautifully but, when i try to open files with nested refs, the drwaings are not scaled, rotated and placed correctly, instead one is placed on top of the other.
why is that???


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