Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inventor exported .DXF Clean up in Autocad

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
will_roe
751 Views, 5 Replies

Inventor exported .DXF Clean up in Autocad

Hi!

 

I'm currently trying to streamline the process in which the office exports DXFs for in house plasma cutting.

We currently export face on our inventor parts and then open it in Autocad and explode, purge, overkill and export as 2007 (our plasma is quite temperamental).

 

I have Inventor side sorted so it's dropping a .DXF in the users downloads folder and I've written a script and made a button using a Macro via CUI to do the cleaning.

 

Where it seems to trip up is saving as a 2007 DXF. I've been using DXFOUT which works when I type it out but when I make it a script it seems to trip up saving over itself. Alternatively I tried using .dwg to then export to .dxf and it still won't work. I'm trying to avoid running it with just the default settings because a few other people will be running it and I feel this is a variable I don't want to contend with if I want a 100% success rate in running it.

 

Here's what I have-

 

_PURGE
A
*
N
EXPLODE
ALL
_AI_SELALL
-OVERKILL
D
_AUDIT
Y
_DXFOUT

_VERSION
LT2007
16
Y

 

Alternatively I tried using just the macro to just get the DXFOUT part to work without success-

^c^c_DXFOUT;^m;V;LT2007;16;Y

 

I appreciate any help I can get on this one.

 

Cheers

5 REPLIES 5
Message 2 of 6
TheCADnoob
in reply to: will_roe

This seems to work for me

_PURGE
A
*
N
EXPLODE
ALL
_AI_SELALL
-OVERKILL
D
_AUDIT
Y
_DXFOUT

V
LT2007
16

CADnoob

EESignature

Message 3 of 6
will_roe
in reply to: TheCADnoob

Thank you! I can get it to run like it should now if I export it as a .DWG from inventor but then when I open the exported DXF after running the Autocad script it still has 3 layer that can be purged (Hidden, Centre & Phantom) this shouldn't be a problem but this method means the user has to delete a bunch of .DWGs.

 

I would love to get exporting from DXF to work. The problem I run into with the .DXF (I think) is for some reason when running DXFOUT as a script it doesn't like to replace its own source file. You get the below message. Annoyingly if you finish the script after AUDIT and type out what the script would input there are no issues.

ERROR.JPG

 

Does anyone have any ideas how to fix this or a work around?

 

Message 4 of 6
cadffm
in reply to: will_roe

The whole file as DXF?

For this, use _.SAVEAS instead _.DXFOUT

 

For testing and to see the options, set filedia temporary to 0,

start _saveas command..

Sebastian

Message 5 of 6
will_roe
in reply to: cadffm

Cheers, that works but for some reason purged linetypes come back when I reopen it. Luckly the plasma cutter seems to tolerate them🤞

 

Ended up with-

 

EXPLODE
ALL
_PURGE
A
*
N
_AI_SELALL
-OVERKILL
D
_AUDIT
Y
_SAVEAS
DXF
V
LT2007
16

 

Y

 

Message 6 of 6
TheCADnoob
in reply to: will_roe

Excellent. Glad we could help and I hope the plasma cutter stays ok with it haha. 

CADnoob

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report