netDxf .net library Read and write AutoCAD dxf files

Nov 23, 2016 at 12:42 PM
I try this netDxf .net library programmed in C# to read and write AutoCAD dxf files.

I need in this moment only read AutoCAD dxf file from the web server without success because I don't have error but only white and empty webpage.

How to do resolve this ?

Can you help me?

Thank you in advance, my code below.

BR
Antonio
    DxfDocument allImages = DxfDocument.Load("C:\\inetpub\\wwwroot\\web220000.dxf");
    int counter = 1;
    foreach (netDxf.Entities.Image image in allImages.Images)
    {
        DxfDocument doc = new DxfDocument();
        netDxf.Entities.Image copy = (netDxf.Entities.Image)image.Clone();
        doc.AddEntity(copy);
        string fileName = string.Format("Image{0}.dxf", counter++);
        doc.Save(fileName);
    }
Coordinator
Nov 23, 2016 at 5:10 PM
What is this white and empty webpage you are talking about? The dxf your are trying to load is somewhere in your c: drive. One thing you have to consider when working with Images is that they are always externally linked, they are not embedded into the dxf in any way, therefore you will have to have localized not only the dxf but also the bitmap files the Image entity is pointing to.

Daniel
Nov 29, 2016 at 9:50 AM
Hi Daniel, thank you so much for quickly reply.
I need open in an web page the archive C:\inetpub\wwwroot\web220000.dxf from the web server.
Your library is good for this or I don't understand its operation?

Thank you in advance for your new help.
All the best.
Vincenzo
Coordinator
Dec 4, 2016 at 5:24 PM
The library does not contain any kind of methods to make a graphical representation of the content of the dxf, if that is what are you looking for. It is only good for open, saving, and editing its elements, like adding, removing and moving entities and table objects between files.

Daniel