Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Reading DXF File

Reading DXF File

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cithu
    wrote on last edited by
    #1

    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. <>

    P 1 Reply Last reply
    0
    • C cithu

      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. <>

      P Offline
      P Offline
      peiman
      wrote on last edited by
      #2

      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_

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups