Reading DXF File
-
We are using the cad library for developing the Auto cad application.We are in need to read the Dxf file using your library.Just explain how to read the dxf file. Never let anything go for granted. <>
this is my beta code use it if it's useable for u (up to DXF14) ////////////////////////////////////////////////////////////////
_READ.h: interface for the CDXF_READ class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_DXF_READ_H__0C34F7F9_A3E2_11D2_B76C_CAED36AA095C__INCLUDED_) #define AFX_DXF_READ_H__0C34F7F9_A3E2_11D2_B76C_CAED36AA095C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 /////////warnnigs < 1000 #define ER_NOTABLEHEADER -993 #define ER_VOIDBLOCKS -994 #define ER_VOIDHEADER -995 #define ER_VOIDTABLES -996 #define ER_FILECORRUPT -997 #define ER_NOENDSEC -998 #define ER_MISSEDENDOFFILE -999 ////////////////// #define ER_WARNNIG -1000 /////////errors > 1000 #define ER_INVALIDFILENAME -1001 #define ER_NOSUCHFILE -1002 #define ER_BADVALUE -1003 #define ER_VOIDENTITY -1004 #define ER_BADTABLES -1005 #include "..\drw_dxf.h" class CDXF_FILE { CStdioFile m_file; CString m_str; public : int Open(LPCSTR); void Close(); CDXF_FILE (); virtual ~CDXF_FILE (); double ReadDouble(); float ReadFloat(); __int8 ReadInt8(); __int16 ReadInt16(); __int32 ReadInt32(); BOOL EndOfFile(); BOOL ReadString(CString&); private: BOOL m_fileColse; }; class CDXF_READ { public: BOOL ProcessSystemMsg(); struct DXF_RECORD { int what; __int8 m_int8; __int16 m_int16; __int32 m_int32; double m_double; float m_float; CString m_string; } Rec; int Read_DXF_Line(); CDXF_READ(); CDXF_READ(LPCSTR dxf_file); virtual ~CDXF_READ(); int Process_Free_DXF(LPCSTR dxf_file=NULL); int Process_DXF(LPCSTR dxf_file=NULL); private: BOOL GroupCircle; BOOL EndOfFileReached; BOOL NOT_READ_BEFOR; CDXF_FILE fileDXF; int Process_EndOfFile(); int Process_Entites(BOOL READ_SECTION = TRUE); int Process_Tables(BOOL READ_SECTION = TRUE); int Process_Blocks(BOOL READ_SECTION = TRUE); int Process_Header(BOOL READ_SECTION = TRUE); int Open_DXF_File(); ////////////tables section int Parse_LayerInfo(); int Parse_TableItemInfo(); ////////////entities section int Parse_LineInfo(); int Parse_PolyLineInfo(); int Parse_LWPolyLineInfo(); int Parse_CircleInfo(); int Parse_ArcInfo(); int Parse_TextInfo(); int Parse_MTextInfo(); int Parse_SolidInfo(); int Parse_PointInfo(); int Parse_InsertInfo(); int Parse_SeqendInfo(); int Parse_