Results 1 to 6 of 6

Thread: dxf writing

  1. #1
    Member
    Join Date
    2015-04
    Posts
    16
    Login to Give a bone
    0

    Default dxf writing

    Hi,


    I have an xml file that contains all details of entities to create a drawing. I want to first create a dxf file from this information. Is this possible?


    Thanks

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,412
    Login to Give a bone
    0

    Default Re: dxf writing

    Possible? Yes. Easy? No. There isn't much documentation on the file structure. It would be easy to get the format wrong. Is there some reason you have to have dxf? I would just use the xml to create entities in a dwg. if you need dxf, you could always do SaveAs.
    C:> ED WORKING....


    LinkedIn

  3. #3
    Member
    Join Date
    2015-04
    Posts
    16
    Login to Give a bone
    0

    Default Re: dxf writing

    I think creating entities would also be fine. I will try to work on it and see.

  4. #4
    Member
    Join Date
    2016-01
    Posts
    33
    Login to Give a bone
    0

    Default Re: dxf writing

    You can use .net dxf library. It can create dxf files easily.
    https://netdxf.codeplex.com/

  5. #5
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: dxf writing

    By electing to write to DXF in lieu of DWG you're also relegating your capabilities, when you could instead simply use the same code base for this or other tasks by writing to DWG and simply exporting/saving to DXF.

    Remember, the DWG you're appending entities to the Database of need not be named, but can even be a mere temporary file (before the resultant DXF is created), so the 'overhead' differential is negligible, yet enhanced functionality and entity support is available. Win-win.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  6. #6
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: dxf writing

    There may be an advantage to using ASCII DXF: an XSL transform could be applied to convert the XML to a DXF file without any type of AutoCAD involvement. I've done similar to convert XML data to HTML, CSV, and other ASCII formats. The stylesheet would be quite limited in what it could handle unless you don't mind it getting horribly complicated.

Similar Threads

  1. DWF Writing
    By thegedus in forum Design Review - General
    Replies: 2
    Last Post: 2008-11-19, 03:19 PM
  2. Writing dwg's to a zip file.
    By kdayman in forum VBA/COM Interop
    Replies: 14
    Last Post: 2008-08-12, 06:13 PM
  3. Writing a DXF file
    By meyekj in forum AutoLISP
    Replies: 5
    Last Post: 2008-06-13, 05:34 AM
  4. 3D PDF - writing
    By trombe in forum Revit - Plotting/Printing/Exporting
    Replies: 12
    Last Post: 2006-03-13, 09:50 AM
  5. Writing x,y,z coordinates
    By windowsxp5 in forum AutoLISP
    Replies: 1
    Last Post: 2005-08-01, 01:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •