Exporting to different file formats during a Save event is easy with iLogic, you wouldn't have to worry about it at the end of a project.
The only slightly tricky part is what kind of folder structure you have and whether you want the exported files in different folders for each project.
I haven't used Task Scheduler, so I'm not familiar how it gathers filenames for exporting, but this isn't a problem with iLogic when written correctly.
For PDF Printing, the easiest solution is to use Microsoft Print to PDF, but that's only available in Windows 10. The only other solution to PDFs is to use the PDF Export function built in to Inventor, unfortunately a side effect that hasn't been removed yet is the line layers can be individually selected and turned off in the PDF, which some companies don't like due to some copyright issues on top of just being annoying.
For quick export rules, each of these rules will export matching filenames and will go in the same folder as the file it was exported from.
Here's the rule for exporting a DWF file from an assembly:
I haven't work with DWF files, so I don't know all of the options for exporting, but they probably aren't too hard to find.
SyntaxEditor Code Snippet
'Get DWF Add In by ID Number.
DWFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD95-2F4D-42CE-8BE0-8AEA580399E4}")
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = kFileBrowseIOMechanism
'Set Options for Export.
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
If DWFAddIn.HasSaveCopyAsOptions(ThisDoc.Document, oContext, oOptions) Then
oOptions.Value("Launch_Viewer") = 0
'Other Options.
'oOptions.Value("Publish_All_Component_Props") = 1
'oOptions.Value("Publish_All_Physical_Props") = 1
'oOptions.Value("Password") = 0
End If
'Set filename and folder for export.
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
oDataMedium.FileName = ThisDoc.PathAndFileName(False) + ".dwf"
'Export DWF File.
Call DWFAddIn.SaveCopyAs(ThisDoc.Document, oContext, oOptions, oDataMedium)
Here's the rule to export a STEP file from a part:
SyntaxEditor Code Snippet
'Get STEP Translator by Add In ID Number.
oSTEPTranslator = ThisApplication.ApplicationAddIns.ItemById("{90AF7F40-0C01-11D5-8E83-0010B541CD80}")
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = kFileBrowseIOMechanism
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
oDataMedium.FileName = ThisDoc.PathAndFileName(False) + ".stp"
'Set Options for Export, then Export.
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
If oSTEPTranslator.HasSaveCopyAsOptions(ThisDoc.Document, oContext, oOptions) Then
' Set application protocol.
' 2 = AP 203 - Configuration Controlled Design
' 3 = AP 214 - Automotive Design
oOptions.Value("ApplicationProtocolType") = 2
' Other options...
'oOptions.Value("Author") = ""
'oOptions.Value("Authorization") = ""
'oOptions.Value("Description") = ""
'oOptions.Value("Organization") = ""
Call oSTEPTranslator.SaveCopyAs(ThisDoc.Document, oContext, oOptions, oDataMedium)
End If
Here's the rule for exporting DXF from a Drawing:
SyntaxEditor Code Snippet
'Get DXF Add In by ID Number.
DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = kFileBrowseIOMechanism
'Set path and file name for export.
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
oDataMedium.FileName = ThisDoc.PathAndFileName(False) + ".dxf"
' Get INI file for DXF Options.
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
oOptions.Value("Export_Acad_IniFile") = "C:\tempDXFOut.ini" '''Enter your folder location and name of .ini file here.
Call DXFAddIn.SaveCopyAs(ThisDoc.Document, oContext, oOptions, oDataMedium)
Here's the PDF Export via Microsoft Print to PDF:
SyntaxEditor Code Snippet
'Set PDF Print Options.
prntMgr = ThisApplication.ActiveDocument.PrintManager
prntMgr.Printer = "Microsoft Print to PDF"
prntMgr.ColorMode = kPrintDefaultColorMode
prntMgr.Orientation = kLandscapeOrientation
prntMgr.Scale = kPrintBestFitScale
prntMgr.PaperSize = kPaperSizeDefault
prntMgr.PrintRange = kPrintAllSheets
'Export PDF.
prntMgr.PrintToFile(ThisDoc.PathAndFileName(False) + ".pdf"
Here's the PDF Export via Inventor PDF Export:
SyntaxEditor Code Snippet
'Get PDF Add In by ID Number.
oPDFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
'Set folder path and file name for Export.
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
oDataMedium.FileName = ThisDoc.PathAndFileName(False) + ".pdf"
'Set Options for Export.
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
oOptions.Value("All_Color_AS_Black") = 0
oOptions.Value("Remove_Line_Weights") = 1
oOptions.Value("Vector_Resolution") = 4800
oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets
Call oPDFAddIn.SaveCopyAs(ThisDoc.Document, oContext, oOptions, oDataMedium)
Let me know if you have any issues or any questions for setting up each rule.
Philip Martick
Inventor 2018 Pro, AutoCAD 2018, Autodesk Vault Basic 2018
Windows 10 Pro
2X Intel Xeon E5-2630 v4 @ 2.20GHz
16.00 GB of RAM
NVIDIA Quadro M2000