Click here to Skip to main content
15,042,814 members
Please Sign up or sign in to vote.
1.67/5 (3 votes)

I have a text file with cordinates of spline. I want a code to convert those cordinates into dxf file.

What I have tried:

I have less knowledge about points to dxf
Posted
Updated 22-Oct-19 1:25am

Than you need to acquire the knowledge. I used my search engine to find the dxf format in the wikipedia. Read it to understand the format and follow some links. When you understand it, you may write some converter code.

It is simple text readable format, so simple things shouldnt be too hard.

Tip: check your results with some sample data which you open in some dxf viewer.
   
I hve no need for a spline to DXF convertor so I am not going to go out and write one. However I did minimal research (wikipedia) and found that they can be simple text files, and they have a published reference guide to the structure (see references below).

What I would probably do first is to get a simple DXF file and open it up in your favorite text editor and look to see what numbers end up where.

Then I would probably replace those numbers with some placeholders and save is at a template.

Next would be a simple program to read in that template, and replace those placeholders with the numbers I want in there.

Then I would save this as MyFirstAttempt.DXF and see if it worked

And there would be some troubleshooting involved, but it's a start.

Reference:
DXF Spec- http://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf[^]
   
Comments
Member 14630688 7-Nov-19 1:44am
   
Thanks for the response KarnstenK and MadMyche. I have made a program to convert the coordinate file into dxf and it works like a charm!
Member 14698244 7-Sep-20 20:19pm
   
hi...can upload the program i need it pleaze
hasan.alsarraf1985@gmail.com

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900