YOU CAN CODE!

 

With The Case Of UCanCode.net  Release The Power OF  Visual C++ !   HomeProducts | PurchaseSupport | Downloads  
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
Overview
Features Tour 
Electronic Form Solution
Visualization & HMI Solution
Power system HMI Solution
CAD Drawing and Printing Solution

Bar code labeling Solution
Workflow Solution

Coal industry HMI Solution
Instrumentation Gauge Solution

Report Printing Solution
Graphical modeling Solution
GIS mapping solution

Visio graphics solution
Industrial control SCADA &HMI Solution
BPM business process Solution

Industrial monitoring Solution
Flowchart and diagramming Solution
Organization Diagram Solution

Graphic editor Source Code
UML drawing editor Source Code
Map Diagramming Solution

Architectural Graphic Drawing Solution
Request Evaluation
Purchase
ActiveX COM Products
Overview
Download
Purchase
Technical Support
  General Q & A
Discussion Board
Contact Us

Links

Get Ready to Unleash the Power of UCanCode .NET

 


UCanCode Software focuses on general application software development. We provide complete solution for developers. No matter you want to develop a simple database workflow application, or an large flow/diagram based system, our product will provide a complete solution for you. Our product had been used by hundreds of top companies around the world!

"100% source code provided! Free you from not daring to use components because of unable to master the key technology of components!"


Visual C++ Example: DXF File Drawing, load, write

 
 

By Claude Gagnon


  • This article demonstrate how to write an ASCII DXF files. A DXF file is a file composed of sections and associated values. They are read by AutoCad and then converted to a drawing.

    I have developped a class CDxf to write a DXF file from an application. Then the user must use AutoCad to interpret the DXF file.

    I have included only a small portion of what can be do with DXF files. All the details are contained in the following document from the AutoDesk web site : http://www.autodesk.com/techpubs/autocad/dxf/.

    // Here is the code to write a DXF file that will draw a circle in AutoCad.
    // 
    void CDxf::Circle ()
    {
    	// 1000 diameter circle
    	// Creation of an output stream objet in text mode.
    	// ios::app : append
    	ofstream FichierDxf ("TestDxf.dxf", ios::app);
    
    	// Draw the circle
    	FichierDxf << 0          << endl;
    	FichierDxf << "CIRCLE"   << endl;
    	FichierDxf << 8          << endl;       // Group code for layer name
    	FichierDxf << 0          << endl;       // Layer number
    	FichierDxf << 10         << endl;       // Center point of circle
    	FichierDxf << 0.0        << endl;       // X in OCS coordinates
    	FichierDxf << 20         << endl;
    	FichierDxf << 0.0        << endl;       // Y in OCS coordinates
    	FichierDxf << 30         << endl;
    	FichierDxf << 0.0        << endl;       // Z in OCS coordinates
    	FichierDxf << 40         << endl;       // radius of circle
    	FichierDxf << 500.0      << endl;       
    
    	FichierDxf.close();
    }

    By being able to write a DXF file, I can integrate into my applications a way to share information with AutoCad. Obviously there is a lot more that can be added to this class.

  • Downloads

    Download source - 6 Kb

     

    Copyright ?1998-2024 UCanCode.Net Software , all rights reserved.
    Other product and company names herein may be the trademarks of their respective owners.

    Please direct your questions or comments to webmaster@ucancode.net