Message 1 of 15
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have this iLogic code that takes a multi sheet file and exports each sheet, taking the sheet name, and then exporting them as seperate documents,
The code works great, however it is now not working, and I have no idea why ! It simply show the message box, OPDF Export Complete! But nothing happens.
Can someone help
'['Sub Variables oRefDocs = ThisApplication.ActiveDocument.AllReferencedDocuments Dim oDoc As Document oFolder = ThisDoc.Path oAddIns = ThisApplication.ApplicationAddIns oTG = ThisApplication.TransientObjects'] '['PDF Export '['PDF Options PDFAddIn = oAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}") oContext = oTG.CreateTranslationContext oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism oOptions = oTG.CreateNameValueMap oDataMedium = oTG.CreateDataMedium oOptions.Value("All_Color_AS_Black") = 1 oOptions.Value("Remove_Line_Weights") = 1 oOptions.Value("Vector_Resolution") = 4800 oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintCurrentSheet'] For Each oDoc In oRefDocs idwPathName = Left(oDoc.FullDocumentName, Len(oDoc.FullDocumentName) -3) & "idw" If System.IO.File.Exists(idwPathName) Then oDrawDoc = ThisApplication.Documents.Open(idwPathName, True) For Each oSheet As Sheet In oDrawDoc.Sheets oSheet.Activate oDataMedium.FileName = oFolder + oSheet.Name + ".pdf" Call PDFAddIn.SaveCopyAs(oDrawDoc, oContext, oOptions, oDataMedium) Next oDrawDoc.Close(True) End If Next'] MessageBox.Show("PDF Export completed.", "PDF Export", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
Solved! Go to Solution.