Hi @ziyad_nuwayhid. I do not use that specific export file type, but this is a pretty familiar situation, so I think I can help some here. Instead of using the simplistic SaveAs method, you will need to use the more complex TranslatorAddIn.SaveCopyAs method, which gives you the ability to specify 'options' for the export process. When using this method, we can 'extract' the possible 'options' internal names and their current values, as a guide to help us with writing the code for setting the options. Below is an example iLogic rule you can use to extract those options.
Sub Main
Dim oDoc As Inventor.Document = ThisDoc.Document
Dim oTranslator As Inventor.TranslatorAddIn
For Each oAppAddin As Inventor.ApplicationAddIn In ThisApplication.ApplicationAddIns
If oAppAddin.DisplayName = "Translator: DWFx" Then
oTranslator = oAppAddin
If Not oTranslator.Activated Then oTranslator.Activate()
End If
Next
'make sure the iLogic Log Window is visible (will show up as a tab next to iLogic tab)
ThisApplication.UserInterfaceManager.DockableWindows.Item("ilogic.logwindow").Visible = True
LogTranslatorOptions(oDoc, oTranslator)
End Sub
Sub LogTranslatorOptions(oDocToExp As Inventor.Document, oTransAddIn As Inventor.TranslatorAddIn)
Dim oContext As Inventor.TranslationContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = Inventor.IOMechanismEnum.kUnspecifiedIOMechanism
Dim oOptions As Inventor.NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
Dim oReport As New System.Text.StringBuilder
If oTransAddIn.HasSaveCopyAsOptions(oDocToExp, oContext, oOptions) Then
Dim oItem As Integer = 1
For Each oPair In oOptions
oReport.AppendLine("Option Name = " & oOptions.Name(oItem))
oReport.AppendLine("Option Value = " & oOptions.Value(oOptions.Name(oItem)).ToString)
oReport.AppendLine()
oItem = oItem + 1
Next
End If
Logger.Info(vbCrLf & oReport.ToString)
End Sub
The options and their current settings may change due to what type of document is currently active when it is ran. For me, with a 'new' part open, using Inventor 2024, I get the following results in my iLogic Log window:
(I made that 'option' Bold, and red, to simplify.) Hint, a zero or one are often used as Boolean values, instead of True/False.
Option Name = Publish_All_Sheets
Option Value = 0
Option Name = Publish_3D_Models
Option Value = 0
Option Name = Launch_Viewer
Option Value = 1
Option Name = Password
Option Value =
Option Name = Publish_Mode
Option Value = 62721
Option Name = Enable_Large_Assembly_Mode
Option Value = 0
Option Name = Enable_Measure
Option Value = 1
Option Name = Enable_Printing
Option Value = 1
Option Name = Enable_Markups
Option Value = 1
Option Name = Enable_Markup_Edits
Option Value = 1
Option Name = Output_Path
Option Value =
Option Name = Include_Sheet_Tables
Option Value = 1
Option Name = Sheet_Metal_Flat_Pattern
Option Value = 0
Option Name = Sheet_Metal_Style_Information
Option Value = 0
Option Name = Sheet_Metal_Part
Option Value = 1
Option Name = Weldment_Preparation
Option Value = 0
Option Name = Weldment_Symbol
Option Value = 0
Option Name = BOM_Structured
Option Value = 1
Option Name = BOM_Parts_Only
Option Value = 1
Option Name = Animations
Option Value = 0
Option Name = Instructions
Option Value = 0
Option Name = iAssembly_All_Members
Option Value = 0
Option Name = iAssembly_3D_Models
Option Value = 0
Option Name = iPart_All_Members
Option Value = 0
Option Name = iPart_3D_Models
Option Value = 0
Option Name = Publish_Component_Props
Option Value = 1
Option Name = Publish_Mass_Props
Option Value = 1
Option Name = Include_Empty_Properties
Option Value = 0
Option Name = Publish_Screenshot
Option Value = 0
Option Name = Screenshot_DPI
Option Value = 96
Option Name = Facet_Quality
Option Value = 69379
Option Name = Force_Facet_Recompute
Option Value = 0
Option Name = Facet_Recompute_Tolerance
Option Value = 0.001
Option Name = Override_Sheet_Color
Option Value = 0
Option Name = Sheet_Color
Option Value = 0
Option Name = Sheet_Range
Option Value = 14082
Option Name = Custom_Begin_Sheet
Option Value = 1
Option Name = Custom_End_Sheet
Option Value = 1
Option Name = All_Color_AS_Black
Option Value = 0
Option Name = Remove_Line_Weights
Option Value = 0
Option Name = Vector_Resolution
Option Value = 720
Option Name = TranscriptAPICall
Option Value = 0
Wesley Crihfield

(Not an Autodesk Employee)