Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

When working this problem by hand, there is a checkbox in the options wizard, that allows you to select a specific sheet or sheets.  When I saved that configuration into a *.ini file, I noticed an option that says "ALL SHEETS=No" under [EXPORT DESTINATION], however that file did not mention the sheet I selected.  So at least I know there is access to this option.

In this code, I export with a bit more direct control over the actual translator.  I suspect your answer lies in the oNameValueMap including something for the sheets to be printed.

    Public Sub ExportACAD(settingsFile As String, isDWG As Boolean)
        Dim invApp As Inventor.Application = TTSInventorTools.GetInventorApplication
        ' Set a reference to the DWG translator add-in.
        Dim oDWGAddIn As TranslatorAddIn = Nothing
        'USE DWG OR DXF FIND "DESTNATION DXF=Yes or No" in ini file (text file)
        Dim ClassID As String = "{C24E3AC4-122E-11D5-8E91-0010B541CD80}"
        Dim ext As String = ".dxf"
        If isDWG Then
            ClassID = "{C24E3AC2-122E-11D5-8E91-0010B541CD80}" ' = DWG TRANSLATOR
            ext = ".dwg"
        End If
        Dim i As Long
        For i = 1 To invApp.ApplicationAddIns.Count()
            If invApp.ApplicationAddIns.Item(i).ClassIdString = ClassID Then
                oDWGAddIn = invApp.ApplicationAddIns.Item(i)
                Exit For
            End If
        Next
        If oDWGAddIn Is Nothing Then
            MsgBox("DWG add-in not found.", MsgBoxStyle.SystemModal)
            Exit Sub
        End If
        ' Check to make sure the add-in is activated.
        If Not oDWGAddIn.Activated Then
            oDWGAddIn.Activate()
        End If
        ' Create a name-value map to supply informationto the translator.
        Dim oNameValueMap As NameValueMap
        oNameValueMap = invApp.TransientObjects.CreateNameValueMap()
        ' Create the name-value that specifiesthe ini file to use.
        Call oNameValueMap.Add("Export_Acad_IniFile", settingsFile)
        ' Create a translation context and define that we want to output to a file.
        Dim oContext As TranslationContext
        oContext = invApp.TransientObjects.CreateTranslationContext()
        oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
        ' Define the type of output by specifying the filename.
        Dim oOutputFile As DataMedium
        oOutputFile = invApp.TransientObjects.CreateDataMedium()
        oOutputFile.FileName = ACADFilePath & "\" & Name & ext
        ' Call the SaveCopyAs method of the add-in.
        If Not System.IO.File.Exists(oOutputFile.FileName) Then
            System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(oOutputFile.FileName))
            oDWGAddIn.SaveCopyAs(docINV, oContext, oNameValueMap, oOutputFile)
        End If
    End Sub

Not a complete answer but likely a point into the correct direction.

 

jvj