Creating a dxf file based on a csv

Creating a dxf file based on a csv

Anonymous
Not applicable
4,408 Views
3 Replies
Message 1 of 4

Creating a dxf file based on a csv

Anonymous
Not applicable

Is it possible to create a dxf file based on giving the width and height of a rectangle.

For example, i need to create a dxf file of a rectangle that would be 12cm in length and 10 cm in height, the dimensions would be included in csv format and i would use a converter to convert it into a dxf file.

 

If not, how would i go about creating a csv file which would be able to be converted to a dxf file.

 

Thanks,

Billy

0 Likes
4,409 Views
3 Replies
Replies (3)
Message 2 of 4

rkmcswain
Mentor
Mentor

It should be possible. The DXF file format is documented [ https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf ] - so you'd just need an application to inject your CSV data into the a new or existing DXF file so that you get an appropriate sized closed polyline (there is no "rectangle" entity).
R.K. McSwain     | CADpanacea | on twitter
Message 3 of 4

cadffm
Consultant
Consultant

@Anonymous  schrieb:

Is it possible to create a dxf file based on giving the width and height of a rectangle.



If you really need this, that's pretty simple if you have a template (a file with one closed polyline as ascii dxf).

And if you need to get the information of X/Y from a csv, thats possible too (simple *.bat/*.cmd file).

 

- Do you have experience with * .BAT / *. CMD / *. VBS or .NET or whatever? (if not, start www searching for "bat file search and replace")

   Perfect! I attached a dxf-template, the only thing you have to do are two times a "search&replace"

   1. Search for XWIDTH and replace it with your X-width value (think about the point instead a comma)

   2. Search for YWIDTH and replace it with your Y-width value (think about the point instead a comma)

  Save the File or copy the edited content to a file location an name of your choice (for example: MyTest.dxf)

  thats all - the sample template is a dxf2000 file created in a 2013 version.

 

Do it with notepad by hand as first test!

Sebastian

Message 4 of 4

cadffm
Consultant
Consultant
Yesterday I could not attach a file for unknown reasons,
then I want to post a link to another download source,
but I was not able to create another answer in the forum (tested with 3 different browsers).

Now i try it again 🙂
 
 1st try -> No attachment
2nd try -> we will see (without attachment, just a link)
 
DXF template download -> https://a360.co/2F7n114
 
 

Sebastian

0 Likes