Message Boards Message Boards

1
|
5135 Views
|
8 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Import DXF file from Autodesk fails?

Posted 2 years ago

I created a cylinder (solid primitive) in Autodesk 2020 and then saved the file as Cylinder DXF. In Mathematica, I applied the command Import["C:\ASINVAL\Cylinder.dxf"] and it didn't work, returning the following message:

In[5]:= Import::nffil: File C:\ASINVAL\Cylinder.dxf not found during Import.

Out[5]= $Failed

Does anyone have any tips that might help?
Regards,
Sinval

POSTED BY: Sinval Santos
8 Replies
Posted 2 years ago

Try Import["C:\\ASINVAL\\Cylinder.dxf"]

Note the double \

Note: You might have been doing that. The forum editor seems to be stripping slashes in the posts.

POSTED BY: David Keith
Posted 2 years ago

Yes, it looks like the forum editor did this. Thank you for your attention David.

POSTED BY: Sinval Santos

My experience is that Mathematica's DXF import and export functionality is very limited. It doesn't appear to be anywhere near comprehensive and doesn't seem to work for many CAD objects/entities. Unless you're working with quite basic primitives (e.g. points, lines and the like), I suspect you'll struggle. Given that DXF is such a widely used drawing exchange format in engineering, it would be good to see some improvement.

POSTED BY: Ian Williams
Posted 2 years ago

True Williams. It appears that Matehamatica only imports 3D objects from AutoCad that were created as 2D wireframes. Thank you for your attention.

POSTED BY: Sinval Santos
Posted 2 years ago

Are you sure the file C:\ASINVAL\Cylinder.dxf exists?

POSTED BY: Rohit Namjoshi
Posted 2 years ago

Hello Rohit, thanks for your attention. Yes, this file exists on my PC and the path is correct. I created other DXF files in the 2D version and they worked great with the Import command. I copied some 3D files that are in Mathematica documentation and they worked correctly. The ones created by me don't work.

POSTED BY: Sinval Santos

One way is:

Execute:

 $Path // MatrixForm

Put file "Cylinder.dxf" in one of these places, then execute:

Import["Cylinder.dxf"]

It should work.

POSTED BY: Mariusz Iwaniuk
Posted 2 years ago

Hello Mariusz, thanks for your attention. I copied and ran the command below and it didn't work.

In[2]:= Import["C:\\Program Files\\Wolfram \
Research\\Mathematica\\13.0\\Documentation\\English\\System\\\
ExampleData\\Cylinder.dxf"]

Out[2]= $Failed
POSTED BY: Sinval Santos
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract