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

Hi @AlanBrock9115

 

I tried viewing the attached PDF file and also get the 114 error from Adobe Reader DC when doing a save as.

 

I then tried with my installed Inventor 2018 and a multi-page IDW drawing with 10 sheets.

 

I used the following iLogic rule, mostly copied from your post, but put through Visual Studio to ensure there were no syntactical errors and modified slightly for my local file system:

    Sub Main()
        Dim oDrawing As DrawingDocument = CType(ThisApplication.ActiveDocument, DrawingDocument)

        Dim oMySheetCount As Long = oDrawing.Sheets.Count

        Dim oFileName As String = ThisDoc.FileName(False)
        Dim oRevNum As String = CStr(iProperties.Value("Project", "Revision Number"))
        Dim oDescription As String = CStr(iProperties.Value("Project", "Description"))

        Dim oPDFAddIn As TranslatorAddIn = CType(ThisApplication.ApplicationAddIns.ItemById _
            ("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}"), TranslatorAddIn)

        Dim oContext As TranslationContext = ThisApplication.TransientObjects.CreateTranslationContext
        oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism

        Dim oOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
        oOptions.Value("All_Color_AS_Black") = 0
        oOptions.Value("Remove_Line_Weights") = 1
        oOptions.Value("Vector_Resolution") = 400
        oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintSheetRange
        oOptions.Value("Custom_Begin_Sheet") = 2
        oOptions.Value("Custom_End_Sheet") = 4

        Dim oDataMedium As DataMedium = ThisApplication.TransientObjects.CreateDataMedium
        'Set the PDF target file name
        oDataMedium.FileName = "D:\Temp\Download\" & oFileName & ".pdf"

        Try
            'Publish document
            oPDFAddIn.SaveCopyAs(oDrawing, oContext, oOptions, oDataMedium)
        Catch ex As Exception

        End Try

        Exit Sub
    End Sub

This rule saves a 3 page PDF and this PDF can be opened in Adobe Reader DC and saved as with no problems.

 

My Inventor is the latest version:Inventor_2017-10-26_11-24-50.png

 

 

 

 

 

 

So it works for me with the current Inventor and this iLogic rule on my multi-sheet drawing.

 

Regards,

Jens Bejer Pedersen

Developer, Symetry A/S

www.symetri.com