Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automate DXF creation.

10 REPLIES 10
Reply
Message 1 of 11
dlsteg
1813 Views, 10 Replies

Automate DXF creation.

Is it possible to automate the creation of a DXF file when you save or check-in a part file from inventor. I have already set it up to create a DWF file to a shared folder on our network but we also export to DXF files as well for use in our machine shop. As of now the only way I know of doing it, is to open the .idw file and save it as a DXF manually. If anyone knows how to set this up to automatically create one on save or check-in please let me know.

Thank you,

- Darrin
10 REPLIES 10
Message 2 of 11
petercharles
in reply to: dlsteg

Just to be clear, is that a DXF of the Inventer PART, or a DXF of an Inventor drawing??
Message 3 of 11
dima.shmidt
in reply to: dlsteg

Yes, it's possible 🙂

See my code below

Sub DXF()
MsgBox "DXF-filer creating", vbInformation

Dim invApp As Inventor.Application
Set invApp = ThisApplication
' invApp.SilentOperation = True

Dim idwDoc As Inventor.DrawingDocument
Set idwDoc = invApp.ActiveDocument

Dim dxfFile As String
LaserDir = "c:\temp\"
NewDir = LaserDir + idwDoc.DisplayName + "\"
MkDir (NewDir)
dxfFile = LaserDir + idwDoc.DisplayName + "\" + idwDoc.DisplayName + ".dxf"


With invApp.CommandManager
Call .PostPrivateEvent(kFileNameEvent, dxfFile)
Call .StartCommand(kFileSaveCopyAsCommand)
End With

Set idwDoc = Nothing
'invApp.SilentOperation = False
Set invApp = Nothing

End Sub
Message 4 of 11
Josh_Petitt
in reply to: dlsteg


why did you use the command manager? why not just call:





idwDoc.SaveAs dxfFile, True







Message 5 of 11
petercharles
in reply to: dlsteg

I still remain confused as why he needs to save a DXF version of his IDW for his machine shop?
Message 6 of 11
dima.shmidt
in reply to: dlsteg

It's needed for making cutplans, laser machine read DXF-files only
Message 7 of 11
petercharles
in reply to: dlsteg

Sorry, I didn't equate a machine shop with a laser which I associate with platework.



Of course, if it is a laser for platework that requires the DXF then this can be created automatically from the flat pattern by add-ins already in existance.
Message 8 of 11
Anonymous
in reply to: dlsteg


Take a look at my last blog posting where I discuss
translating files.  I use PDF in the example, but any file type follows the
same concepts.

 


Message 9 of 11
d_mileska
in reply to: dlsteg

Hi,
Maybe you can tell any add-in for dxf creation?
Message 10 of 11
Alpha72
in reply to: Anonymous

Broken Link

Message 11 of 11
Fredalone
in reply to: dima.shmidt

question...

 

Where I put that code?

 

I wanna put an automatic save too...

 

like... hmm...

 

IDW to DXF

 

File -> SaveCopyAs -> DXF file /

 

" DXF Options -> AutoCad 2000 / LT 2000 DXF -> Full Scale (1:1) - Model Space "

 

I do this manually, but I wanna put the code to put this automaticly... Its possible?

Tags (3)

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

Post to forums  

Autodesk Design & Make Report