<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: iLogic save as PDF all sheets in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682297#M59687</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp; It was old code that I've been using for a while so it appears it needs updating. You are correct, the outer try..catch can be removed, thanks. It has been tested and it does work.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Aug 2020 12:23:27 GMT</pubDate>
    <dc:creator>ckeveryga</dc:creator>
    <dc:date>2020-08-10T12:23:27Z</dc:date>
    <item>
      <title>iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682163#M59680</link>
      <description>&lt;P&gt;Morning&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;was hoping someone might help me with my issue of my ilogic code saving as PDF, it only prints the current sheet and not all. I tried adding a for loop in to run through all sheets but this didnt work. It manages to print multiple sheets in dwg format but not PDF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Name = iProperties.Value("Project", "Part Number") &amp;amp; ".dwfx"  
ThisDoc.Document.SaveAs(Name,True)  


Name = ".dwg"  
ThisDoc.Document.SaveAs(ThisDoc.PathAndFileName(False) &amp;amp; Name,True)  


Name =iProperties.Value("Project","Part Number") &amp;amp; ".pdf"  
ThisDoc.Document.SaveAs(Name,True)  



MessageBox.Show("Export of dwfx, dwg &amp;amp; pdf file complete", "Complete")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 11:04:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682163#M59680</guid>
      <dc:creator>jamieking89</dc:creator>
      <dc:date>2020-08-10T11:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682176#M59681</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7226519"&gt;@jamieking89&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you want each sheet as a separate pdf or all sheets in a multisheet pdf?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 11:10:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682176#M59681</guid>
      <dc:creator>JhoelForshav</dc:creator>
      <dc:date>2020-08-10T11:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682180#M59682</link>
      <description>&lt;P&gt;hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5330176"&gt;@JhoelForshav&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like this to be a multi sheet pdf.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 11:15:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682180#M59682</guid>
      <dc:creator>jamieking89</dc:creator>
      <dc:date>2020-08-10T11:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682267#M59683</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; &amp;lt;&amp;gt; &lt;SPAN&gt;kDrawingDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"This can only be run on drawing documents."&lt;/SPAN&gt;, &lt;SPAN&gt;"Error"&lt;/SPAN&gt;)
	&lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;Try&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDraw&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPDFAddIn&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TranslatorAddIn&lt;/SPAN&gt; = &lt;SPAN&gt;Nothing&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oNameValueMap&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;NameValueMap&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oContext&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TranslationContext&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDataMedium&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DataMedium&lt;/SPAN&gt;

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPath&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;

&lt;SPAN&gt;'Save to desktop&lt;/SPAN&gt;
&lt;SPAN&gt;oPath&lt;/SPAN&gt; = &lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;Environment&lt;/SPAN&gt;.&lt;SPAN&gt;GetFolderPath&lt;/SPAN&gt;(&lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;Environment&lt;/SPAN&gt;.&lt;SPAN&gt;SpecialFolder&lt;/SPAN&gt;.&lt;SPAN&gt;Desktop&lt;/SPAN&gt;)

&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oFileName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt;(&lt;SPAN&gt;False&lt;/SPAN&gt;) &lt;SPAN&gt;'without extension&lt;/SPAN&gt;

&lt;SPAN&gt;oPDFAddIn&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ApplicationAddIns&lt;/SPAN&gt;.&lt;SPAN&gt;ItemById&lt;/SPAN&gt;(&lt;SPAN&gt;"{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}"&lt;/SPAN&gt;)

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oPDFAddIn&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
    &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"The DWG add-in could not be found."&lt;/SPAN&gt;)
    &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;' Check to make sure the add-in is activated.&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; &lt;SPAN&gt;oPDFAddIn&lt;/SPAN&gt;.&lt;SPAN&gt;Activated&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;oPDFAddIn&lt;/SPAN&gt;.&lt;SPAN&gt;Activate&lt;/SPAN&gt;()

&lt;SPAN&gt;oContext&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateTranslationContext&lt;/SPAN&gt;
&lt;SPAN&gt;oContext&lt;/SPAN&gt;.&lt;SPAN&gt;Type&lt;/SPAN&gt; = &lt;SPAN&gt;IOMechanismEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kFileBrowseIOMechanism&lt;/SPAN&gt;
&lt;SPAN&gt;oOptions&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateNameValueMap&lt;/SPAN&gt;
&lt;SPAN&gt;oDataMedium&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateDataMedium&lt;/SPAN&gt;

&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"All_Color_AS_Black"&lt;/SPAN&gt;) = 0
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Remove_Line_Weights"&lt;/SPAN&gt;) = 0
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Vector_Resolution"&lt;/SPAN&gt;) = 400
&lt;SPAN&gt;'oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintCurrentSheet&lt;/SPAN&gt;
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Sheet_Range"&lt;/SPAN&gt;) = &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;PrintRangeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kPrintAllSheets&lt;/SPAN&gt;

&lt;SPAN&gt;'Set the PDF target file name&lt;/SPAN&gt;
&lt;SPAN&gt;'oDataMedium.FileName = oPath &amp;amp; "\" &amp;amp; oFileName &amp;amp; ".pdf"&lt;/SPAN&gt;
&lt;SPAN&gt;oDataMedium&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PathAndFileName&lt;/SPAN&gt;(&lt;SPAN&gt;False&lt;/SPAN&gt;) &amp;amp; &lt;SPAN&gt;".pdf"&lt;/SPAN&gt;

&lt;SPAN&gt;'Publish document&lt;/SPAN&gt;
&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;oPDFAddIn&lt;/SPAN&gt;.&lt;SPAN&gt;SaveCopyAs&lt;/SPAN&gt;(&lt;SPAN&gt;oDraw&lt;/SPAN&gt;, &lt;SPAN&gt;oContext&lt;/SPAN&gt;, &lt;SPAN&gt;oOptions&lt;/SPAN&gt;, &lt;SPAN&gt;oDataMedium&lt;/SPAN&gt;)
&lt;SPAN&gt;Catch&lt;/SPAN&gt; &lt;SPAN&gt;ex&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Failed To Export: "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;FileName&lt;/SPAN&gt;) 
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;

&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"PDF can be found on Desktop"&lt;/SPAN&gt;, &lt;SPAN&gt;"Export Complete"&lt;/SPAN&gt;)

&lt;SPAN&gt;Catch&lt;/SPAN&gt; &lt;SPAN&gt;ex&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;ex&lt;/SPAN&gt;.&lt;SPAN&gt;Message&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;try&lt;/SPAN&gt;
&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Aug 2020 12:08:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682267#M59683</guid>
      <dc:creator>ckeveryga</dc:creator>
      <dc:date>2020-08-10T12:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682281#M59684</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4145676"&gt;@ckeveryga&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thats great, lengthy code but works as desired. I previously had issues using PDF translator in VBA so switched to using a simple&amp;nbsp;ilogic rule, this seemed to work though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 12:13:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682281#M59684</guid>
      <dc:creator>jamieking89</dc:creator>
      <dc:date>2020-08-10T12:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682288#M59685</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4145676"&gt;@ckeveryga&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like the code you posted has a Try...Catch block inside of another Try...Catch block.&amp;nbsp; That's usually not good practice (if allowed at all).&amp;nbsp; You should only use Try...Catch blocks around minimal areas of code, where you know it might fail, and don't want the code to stop/error out.&amp;nbsp; Have you tested it?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 12:17:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682288#M59685</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-08-10T12:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682296#M59686</link>
      <description>&lt;P&gt;I would suggest also putting a check in there which checks to see if the PDF file already exists, and asks you if you want to write over it or not.&amp;nbsp; This is the code block I use within my PDF exporter.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'Check to see if the PDF already exists, if it does, ask if you want to over write existing or not.
If System.IO.File.Exists(oDataMedium.FileName) = True Then
	oAnswer = MsgBox("A PDF file with this name already exists." &amp;amp; vbCrLf &amp;amp;
	"Do you want to over write it with this new one?",vbYesNo + vbQuestion + vbDefaultButton2, "PDF ALREADY EXISTS")
	If oAnswer = vbNo Then Return
End If&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 10 Aug 2020 12:22:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682296#M59686</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-08-10T12:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682297#M59687</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp; It was old code that I've been using for a while so it appears it needs updating. You are correct, the outer try..catch can be removed, thanks. It has been tested and it does work.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 12:23:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/9682297#M59687</guid>
      <dc:creator>ckeveryga</dc:creator>
      <dc:date>2020-08-10T12:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/10822142#M59688</link>
      <description>&lt;P&gt;HII&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4145676"&gt;@ckeveryga&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you send me the final updated code for this problem, because i am having the same problem as mentioned in the Title and I am looking for the same answer "multi-sheet in one single .pdf file".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 13:08:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/10822142#M59688</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2021-12-14T13:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/10822336#M59689</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11400658"&gt;@ABHUT_9090&lt;/a&gt;.&amp;nbsp; Actually exporting a multi-sheet drawing to a multi-page PDF is the normal process and the easiest to do.&amp;nbsp; Exporting each drawing sheet to separate PDF files actually requires slightly more work and/or code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an iLogic rule I have used for exporting a the currently 'active' drawing document out as a PDF file.&amp;nbsp; If the drawing has multiple sheets, then the resulting PDF will have multiple pages...one for each drawing sheet.&amp;nbsp; There are numerous versions of similar code out here on the forums though.&amp;nbsp; Many have special PDF file naming requirements though, and many different means are being used for assembling that new file name, which makes for so many different variations of the code.&amp;nbsp; This code (below) simply names the PDF file the exact same as the drawing file, just with the ".pdf" file extension, because that usually suits my needs just fine.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
		MsgBox("This Rule only works on Drawing Documents.  Exiting Rule.", vbExclamation, "iLogic")
		Exit Sub
	End If
	Dim oDDoc As DrawingDocument = ThisApplication.ActiveDocument
	ExportToPDF(oDDoc)
End Sub

Sub ExportToPDF(oDrawing As DrawingDocument)
	'get the PDF Translator Add-in
	Dim oPDFAddin As TranslatorAddIn
	For Each oAddin As ApplicationAddIn In ThisApplication.ApplicationAddIns
		If oAddin.DisplayName = "Translator: PDF" Then
			oPDFAddin = oAddin
		End If
	Next

	'Create the variables needed by the Translator Add-in
	oTO = ThisApplication.TransientObjects
	oContext = oTO.CreateTranslationContext
	oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
	oOptions = oTO.CreateNameValueMap
	oDataMedium = oTO.CreateDataMedium

	'same path and file name as drawing, but with .pdf file extension
	oNewFileName = System.IO.Path.ChangeExtension(oDrawing.FullFileName, ".pdf")
	'oDeskTopDir = System.Environment.GetFolderPath(System.Environment.SpecialFolder.DesktopDirectory)

	'Check to see if the PDF already exists, if it does, ask if you want to overwrite it or not.
	If System.IO.File.Exists(oNewFileName) = True Then
		oAnswer = MsgBox("A PDF file with this name already exists." &amp;amp; vbCrLf &amp;amp;
		"Do you want to overwrite it with this new one?",vbYesNo + vbQuestion + vbDefaultButton2, "PDF ALREADY EXISTS")
		If oAnswer = vbNo Then Exit Sub
	End If
	
	oDataMedium.FileName = oNewFileName
	
	'The following If-Then statement defines the Options available, and their Values.
	If oPDFAddin.HasSaveCopyAsOptions(oDrawing, oContext, oOptions) Then
		oOptions.Value("Publish_All_Sheets") = 1 ' 0 = False, 1 = True
		'oOptions.Value("Sheet_Range") = PrintRangeEnum.kPrintAllSheets
		'oOptions.Value("Custom_Begin_Sheet") = 1
		'oOptions.Value("Custom_End_Sheet") = 4
		oOptions.Value("All_Color_AS_Black") = 0 ' 0 = False, 1 = True
		oOptions.Value("Vector_Resolution") = 720 '150, 200, 400, 600, 720, 1200, 2400, 4800 ' DPI
		oOptions.Value("Remove_Line_Weights") = 0 ' 0 = False, 1 = True
		oOptions.Value("Launch_Viewer") = 1 ' 0 = False, 1 = True
	End If

	'Publish PDF
	oPDFAddin.SaveCopyAs(oDrawing, oContext, oOptions, oDataMedium)
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 14:23:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/10822336#M59689</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-12-14T14:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/10822396#M59690</link>
      <description>&lt;P&gt;Hii,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you for sharing this code , I tried but this code only print one active sheet of the drawing. I want all the sheet as one .pdf file with many pages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 14:41:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/10822396#M59690</guid>
      <dc:creator>ABHUT_9090</dc:creator>
      <dc:date>2021-12-14T14:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/11717200#M59691</link>
      <description>&lt;P&gt;Sorry to revamp an old thread. I've been using your code for a while. I'd now like to add functionality into the rule to add the drawing revision and description into the output pdf filename.&amp;nbsp; Eg. 12345-A123_A (Bracket A).pdf&amp;nbsp; I tried to modify the code, but it comes up with errors. What needs to be put into the rule to achieve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 23:58:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/11717200#M59691</guid>
      <dc:creator>StewartFuchs</dc:creator>
      <dc:date>2023-01-30T23:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/11718420#M59692</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4151186"&gt;@StewartFuchs&lt;/a&gt;.&amp;nbsp; Here is an altered version of the code you can try out.&amp;nbsp; I put the name assembly code in the main Sub, then supplied that new full file name to the export Sub, instead of doing all of that down within the export Sub, because I have found that pattern to allow the export routines to be more dynamically useful across the board.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	If ThisDoc.Document.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
		MsgBox("This Rule only works on Drawing Documents.  Exiting Rule.", vbExclamation, "iLogic")
		Exit Sub
	End If
	Dim oDDoc As DrawingDocument = ThisDoc.Document
	Dim sPathAndName As String = System.IO.Path.ChangeExtension(oDDoc.FullFileName, vbNullString)
	Dim sRev As String = oDDoc.PropertySets.Item(1).Item("Revision Number").Value
	Dim sDesc As String = oDDoc.PropertySets.Item(3).Item("Description").Value
	Dim sNewFullName As String = sPathAndName &amp;amp; "_" &amp;amp; sRev &amp;amp; " (" &amp;amp; sDesc &amp;amp; ").pdf"
	ExportToPDF(oDDoc, sNewFullName)
End Sub

Sub ExportToPDF(oDrawing As DrawingDocument, sNewFullFileName As String)
	Dim oPDF As TranslatorAddIn
	oPDF = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
	Dim oTO As TransientObjects = ThisApplication.TransientObjects
	Dim oContext As TranslationContext = oTO.CreateTranslationContext
	oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
	Dim oOptions As NameValueMap = oTO.CreateNameValueMap
	Dim oDataMedium As DataMedium = oTO.CreateDataMedium
	If System.IO.File.Exists(sNewFullFileName) = True Then
		oAns = MsgBox("A PDF file with this name already exists." &amp;amp; vbCrLf &amp;amp;
		"Do you want to overwrite it with this new one?",vbYesNo + vbQuestion + vbDefaultButton2, "PDF ALREADY EXISTS")
		If oAns = vbNo Then Exit Sub
	End If
	oDataMedium.FileName = sNewFullFileName
	If oPDF.HasSaveCopyAsOptions(oDrawing, oContext, oOptions) Then
		oOptions.Value("Publish_All_Sheets") = 1 ' 0 = False, 1 = True
		oOptions.Value("All_Color_AS_Black") = 0 ' 0 = False, 1 = True
		oOptions.Value("Vector_Resolution") = 720 '150, 200, 400, 600, 720, 1200, 2400, 4800 ' DPI
		oOptions.Value("Remove_Line_Weights") = 0 ' 0 = False, 1 = True
		oOptions.Value("Launch_Viewer") = 1 ' 0 = False, 1 = True
	End If
	Try
		oPDF.SaveCopyAs(oDrawing, oContext, oOptions, oDataMedium)
	Catch e As Exception
		Logger.Error("Error using SaveCopyAs method." &amp;amp; vbCrLf &amp;amp; e.Message &amp;amp; vbCrLf &amp;amp; e.StackTrace)
	End Try
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN&gt;&lt;STRONG&gt; ACCEPT SOLUTION &lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 12:36:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/11718420#M59692</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-01-31T12:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/11720208#M59693</link>
      <description>&lt;P&gt;That works brilliantly. Thanks so much.&amp;nbsp; I did make a minor change though as shown below, as it didn't pick up the description from the drawing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StewartFuchs_0-1675207040857.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1169847i99AF879A4D44E099/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StewartFuchs_0-1675207040857.png" alt="StewartFuchs_0-1675207040857.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;DocumentType&lt;/SPAN&gt; &amp;lt;&amp;gt; &lt;SPAN&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kDrawingDocumentObject&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"This Rule only works on Drawing Documents.  Exiting Rule."&lt;/SPAN&gt;, &lt;SPAN&gt;vbExclamation&lt;/SPAN&gt;, &lt;SPAN&gt;"iLogic"&lt;/SPAN&gt;)
		&lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sPathAndName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;IO&lt;/SPAN&gt;.&lt;SPAN&gt;Path&lt;/SPAN&gt;.&lt;SPAN&gt;ChangeExtension&lt;/SPAN&gt;(&lt;SPAN&gt;oDDoc&lt;/SPAN&gt;.&lt;SPAN&gt;FullFileName&lt;/SPAN&gt;, &lt;SPAN&gt;vbNullString&lt;/SPAN&gt;)
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sRev&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;oDDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1).&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Revision Number"&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sDesc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;oDDoc&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(3).&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Description"&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sNewFullName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;sPathAndName&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"_"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;sRev&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;" ("&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Description"&lt;/SPAN&gt;) &amp;amp; &lt;SPAN&gt;").pdf"&lt;/SPAN&gt;
	&lt;SPAN&gt;ExportToPDF&lt;/SPAN&gt;(&lt;SPAN&gt;oDDoc&lt;/SPAN&gt;, &lt;SPAN&gt;sNewFullName&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;ExportToPDF&lt;/SPAN&gt;(&lt;SPAN&gt;oDrawing&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt;, &lt;SPAN&gt;sNewFullFileName&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;)
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPDF&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TranslatorAddIn&lt;/SPAN&gt;
	&lt;SPAN&gt;oPDF&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ApplicationAddIns&lt;/SPAN&gt;.&lt;SPAN&gt;ItemById&lt;/SPAN&gt;(&lt;SPAN&gt;"{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}"&lt;/SPAN&gt;)
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTO&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TransientObjects&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oContext&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TranslationContext&lt;/SPAN&gt; = &lt;SPAN&gt;oTO&lt;/SPAN&gt;.&lt;SPAN&gt;CreateTranslationContext&lt;/SPAN&gt;
	&lt;SPAN&gt;oContext&lt;/SPAN&gt;.&lt;SPAN&gt;Type&lt;/SPAN&gt; = &lt;SPAN&gt;IOMechanismEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kFileBrowseIOMechanism&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOptions&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;NameValueMap&lt;/SPAN&gt; = &lt;SPAN&gt;oTO&lt;/SPAN&gt;.&lt;SPAN&gt;CreateNameValueMap&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDataMedium&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DataMedium&lt;/SPAN&gt; = &lt;SPAN&gt;oTO&lt;/SPAN&gt;.&lt;SPAN&gt;CreateDataMedium&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;IO&lt;/SPAN&gt;.&lt;SPAN&gt;File&lt;/SPAN&gt;.&lt;SPAN&gt;Exists&lt;/SPAN&gt;(&lt;SPAN&gt;sNewFullFileName&lt;/SPAN&gt;) = &lt;SPAN&gt;True&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;oAns&lt;/SPAN&gt; = &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;"A PDF file with this name already exists."&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;vbCrLf&lt;/SPAN&gt; &amp;amp;
		&lt;SPAN&gt;"Do you want to overwrite it with this new one?"&lt;/SPAN&gt;,&lt;SPAN&gt;vbYesNo&lt;/SPAN&gt; + &lt;SPAN&gt;vbQuestion&lt;/SPAN&gt; + &lt;SPAN&gt;vbDefaultButton2&lt;/SPAN&gt;, &lt;SPAN&gt;"PDF ALREADY EXISTS"&lt;/SPAN&gt;)
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oAns&lt;/SPAN&gt; = &lt;SPAN&gt;vbNo&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;oDataMedium&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt; = &lt;SPAN&gt;sNewFullFileName&lt;/SPAN&gt;
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oPDF&lt;/SPAN&gt;.&lt;SPAN&gt;HasSaveCopyAsOptions&lt;/SPAN&gt;(&lt;SPAN&gt;oDrawing&lt;/SPAN&gt;, &lt;SPAN&gt;oContext&lt;/SPAN&gt;, &lt;SPAN&gt;oOptions&lt;/SPAN&gt;) &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Publish_All_Sheets"&lt;/SPAN&gt;) = 1 &lt;SPAN&gt;' 0 = False, 1 = True&lt;/SPAN&gt;
		&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"All_Color_AS_Black"&lt;/SPAN&gt;) = 0 &lt;SPAN&gt;' 0 = False, 1 = True&lt;/SPAN&gt;
		&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Vector_Resolution"&lt;/SPAN&gt;) = 720 &lt;SPAN&gt;'150, 200, 400, 600, 720, 1200, 2400, 4800 ' DPI&lt;/SPAN&gt;
		&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Remove_Line_Weights"&lt;/SPAN&gt;) = 0 &lt;SPAN&gt;' 0 = False, 1 = True&lt;/SPAN&gt;
		&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Launch_Viewer"&lt;/SPAN&gt;) = 1 &lt;SPAN&gt;' 0 = False, 1 = True&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;Try&lt;/SPAN&gt;
		&lt;SPAN&gt;oPDF&lt;/SPAN&gt;.&lt;SPAN&gt;SaveCopyAs&lt;/SPAN&gt;(&lt;SPAN&gt;oDrawing&lt;/SPAN&gt;, &lt;SPAN&gt;oContext&lt;/SPAN&gt;, &lt;SPAN&gt;oOptions&lt;/SPAN&gt;, &lt;SPAN&gt;oDataMedium&lt;/SPAN&gt;)
	&lt;SPAN&gt;Catch&lt;/SPAN&gt; &lt;SPAN&gt;E&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;
		&lt;SPAN&gt;Logger&lt;/SPAN&gt;.&lt;SPAN&gt;Error&lt;/SPAN&gt;(&lt;SPAN&gt;"Error using SaveCopyAs method."&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;vbCrLf&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;E&lt;/SPAN&gt;.&lt;SPAN&gt;Message&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;vbCrLf&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;E&lt;/SPAN&gt;.&lt;SPAN&gt;StackTrace&lt;/SPAN&gt;)
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Jan 2023 23:18:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/11720208#M59693</guid>
      <dc:creator>StewartFuchs</dc:creator>
      <dc:date>2023-01-31T23:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/12043797#M59694</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;Is it possible to change the visibility of an layer to off, but still maintaining the possibility to turn it on in the PDF?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ejaL9K8H_0-1687172899524.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1229613iC8EF32A2C74F69CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ejaL9K8H_0-1687172899524.png" alt="ejaL9K8H_0-1687172899524.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is a video of how it os done in Abobe Acrobat PRO:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=9xVUeGu669Y" target="_blank"&gt;https://www.youtube.com/watch?v=9xVUeGu669Y&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best regards Emil&amp;nbsp; Jakobsen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 11:10:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/12043797#M59694</guid>
      <dc:creator>ejaL9K8H</dc:creator>
      <dc:date>2023-06-19T11:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/12044132#M59695</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10359912"&gt;@ejaL9K8H&lt;/a&gt;.&amp;nbsp; I do not believe that would be possible.&amp;nbsp; I believe the layers must be 'On' and must contain some geometry, when the drawing is exported to PDF, for it to retain those layers within the exported PDF.&amp;nbsp; Once you have the exported PDF, you can control the visibility of those included layers as you see in the video.&amp;nbsp; There are not that many options available when exporting a PDF manually (Options dialog below), and although it seems like there may be more options when exporting by code using the TranslatorAddIn, most of the options you may have seen do not actually pertain to PDF's, and none of them seem to offer that level of control over the Layers.&amp;nbsp; I have attached a text file containing all of the 'option' names, and what their value types, and values are.&amp;nbsp; The values can all vary, of course.&amp;nbsp; And the value type shown an Enum variation is simply the Integer Value representation of the Enum variation, instead of including the name of the Enum, and its textual variation name.&amp;nbsp; One important thing to note though, is that the same TranslatorAddIn object used for exporting PDF's is also used for exporting DWF &amp;amp; DWFx file types, so most of the options listed are for use when exporting those other file types.&amp;nbsp; And there is a different ApplicationAddIn object used for 3D PDFs.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WCrihfield_0-1687181132009.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1229688i7FDFE2D5B377F568/image-size/large?v=v2&amp;amp;px=999" role="button" title="WCrihfield_0-1687181132009.png" alt="WCrihfield_0-1687181132009.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You would likely have to make sure those layers were turned on, at least temporarily, just before exporting to PDF, then turn them back off.&amp;nbsp; That Inventor side process could all be taken care of by code, but editing the Layer settings within the exported PDF after the export is another matter.&amp;nbsp; I am not that familiar with controlling either the Adobe Reader or Adoby Accrobat Pro by code, other than maybe simply opening the PDF file, printing it, and closing it again, using the default shell application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 13:31:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/12044132#M59695</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2023-06-19T13:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/12045744#M59696</link>
      <description>Thanks for a detailed answer.&lt;BR /&gt;I had the feeling that would not be possible.&lt;BR /&gt;&lt;BR /&gt;Thanks again&lt;BR /&gt;&lt;BR /&gt;- Emil Jakobsen</description>
      <pubDate>Tue, 20 Jun 2023 04:51:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/12045744#M59696</guid>
      <dc:creator>ejaL9K8H</dc:creator>
      <dc:date>2023-06-20T04:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/12438670#M59697</link>
      <description>&lt;P&gt;here's a code I used to export all my drawing's within an .idw file to PDF format, to the same folder location that the .idw file exists.&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;'this rule outputs all drawing sheets to pdf, 3D models of first sheet not included&lt;/P&gt;&lt;P&gt;oPath = ThisDoc.Path&lt;/P&gt;&lt;P&gt;docName = ThisDoc.FileName(False)&lt;BR /&gt;path_and_name = oPath &amp;amp; "\" &amp;amp; docName&lt;BR /&gt;DWFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD95-2F4D-42CE-8BE0-8AEA580399E4}")&lt;BR /&gt;oDocument = ThisApplication.ActiveDocument&lt;BR /&gt;oContext = ThisApplication.TransientObjects.CreateTranslationContext&lt;BR /&gt;oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism&lt;BR /&gt;oOptions = ThisApplication.TransientObjects.CreateNameValueMap&lt;BR /&gt;oDataMedium = ThisApplication.TransientObjects.CreateDataMedium&lt;/P&gt;&lt;P&gt;If DWFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then&lt;BR /&gt;oOptions.Value("Launch_Viewer") = launchviewer&lt;BR /&gt;oOptions.Value("Publish_All_Component_Props") = 1&lt;BR /&gt;oOptions.Value("Publish_All_Physical_Props") = 1&lt;BR /&gt;oOptions.Value("Password") = 0&lt;BR /&gt;If TypeOf oDocument Is DrawingDocument Then&lt;BR /&gt;Dim oSheets As NameValueMap&lt;BR /&gt;oSheets = ThisApplication.TransientObjects.CreateNameValueMap&lt;BR /&gt;'oOptions.Value("Publish_Mode") = DWFPublishModeEnum.kCustomDWFPublish&lt;BR /&gt;oOptions.Value("Publish_All_Sheets") = 1&lt;/P&gt;&lt;P&gt;End If&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;oDataMedium.FileName = path_and_name &amp;amp; ".pdf"&lt;BR /&gt;Call DWFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)&lt;BR /&gt;If launchviewer = 1 Then ThisDoc.Launch(path_and_name &amp;amp; ".pdf")&lt;/P&gt;&lt;P&gt;oDocument.Save()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after sometime of only one sheet publishing, i went to manually export the file, and as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt; (i think) stated, i had to change the print range to "all sheets" in the dialogue box shown below. after that, it worked like a dream.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eharrisonTZS2M_0-1702474847036.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1304316i5ACE15C941506C5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="eharrisonTZS2M_0-1702474847036.png" alt="eharrisonTZS2M_0-1702474847036.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(note: you can change the oPath at the top of the text file to any directory, then at the bottom, change the file extension to dwf to get the same operation in a dwf file format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oPath = &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;ThisDoc.Path&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;eg. oPath = O:\Product Drawings&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THEN...change&amp;nbsp;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;.pdf&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;.dwf&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oDataMedium.FileName = path_and_name &amp;amp; "&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;.pdf&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;"&lt;BR /&gt;Call DWFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)&lt;BR /&gt;If launchviewer = 1 Then ThisDoc.Launch(path_and_name &amp;amp; "&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;.pdf&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;")&lt;/P&gt;&lt;P&gt;oDocument.Save()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 13:45:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/12438670#M59697</guid>
      <dc:creator>eharrisonTZS2M</dc:creator>
      <dc:date>2023-12-13T13:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save as PDF all sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/13263182#M59698</link>
      <description>&lt;DIV&gt;sorted&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 21:56:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-as-pdf-all-sheets/m-p/13263182#M59698</guid>
      <dc:creator>MuirInvProfessional</dc:creator>
      <dc:date>2025-01-15T21:56:22Z</dc:date>
    </item>
  </channel>
</rss>

