<?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: Save to single-sheet PDF in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10807238#M42576</link>
    <description>&lt;P&gt;Try getting rid of that whole block of code for getting the sheet number, and all of the variables you created for it, then replace all of that with this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;iSheetNumber = oSheet.Name.Split(":")(1)&lt;/LI-CODE&gt;
&lt;P&gt;Split splits the name into multiple parts as an Array of String, and it will be split by the ":" character, so the resulting string array results in 2 parts...sheet name, then sheet number.&amp;nbsp; Then the (1) after the Split call is returning the second of the two parts (array's are zero based, so Item(0) is its first item).&lt;/P&gt;</description>
    <pubDate>Tue, 07 Dec 2021 19:59:54 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2021-12-07T19:59:54Z</dc:date>
    <item>
      <title>Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10807200#M42575</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not an ilogic programmer (yet), I am just starting to learn. I copied this code from 2 different sources but I'm having a problem with the sheet number. It's saving with a 2 in the filename, but I do not understand where it is pulling this from especially when running the rule from sheet 1, as it should be a 1 not a 2. All other properties are appearing in filename correctly, except the sheet number.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PDF filename: Project Number-Part Number-Sheet Number Description.pdf (Ex: S2100-A100-1 Tail Frame.pdf)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know you guys are the experts, any help would be greatly appreciated. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;oPath&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Path&lt;/SPAN&gt;
&lt;SPAN&gt;oFileName&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;oRevNum&lt;/SPAN&gt; = &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Revision Number"&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;oDescription&lt;/SPAN&gt; = &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;)
&lt;SPAN&gt;oPartNumber&lt;/SPAN&gt; = &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;)
&lt;SPAN&gt;oProject&lt;/SPAN&gt; = &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"PROJECT"&lt;/SPAN&gt;)
&lt;SPAN&gt;oDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&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;oDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;' Define folder browse dialog&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;Dialog&lt;/SPAN&gt; = &lt;SPAN&gt;New&lt;/SPAN&gt; &lt;SPAN&gt;FolderBrowserDialog&lt;/SPAN&gt;()
&lt;SPAN&gt;Dialog&lt;/SPAN&gt;.&lt;SPAN&gt;SelectedPath&lt;/SPAN&gt; = &lt;SPAN&gt;"T:\ENG 3D\JOBS"&lt;/SPAN&gt;
&lt;SPAN&gt;Dialog&lt;/SPAN&gt;.&lt;SPAN&gt;ShowNewFolderButton&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
&lt;SPAN&gt;Dialog&lt;/SPAN&gt;.&lt;SPAN&gt;Description&lt;/SPAN&gt; = &lt;SPAN&gt;"Choose Folder for Export..."&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;DialogResult&lt;/SPAN&gt;.&lt;SPAN&gt;OK&lt;/SPAN&gt; = &lt;SPAN&gt;Dialog&lt;/SPAN&gt;.&lt;SPAN&gt;ShowDialog&lt;/SPAN&gt;() &lt;SPAN&gt;Then&lt;/SPAN&gt;
&lt;SPAN&gt;ExportPath&lt;/SPAN&gt; = &lt;SPAN&gt;Dialog&lt;/SPAN&gt;.&lt;SPAN&gt;SelectedPath&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"\"&lt;/SPAN&gt;
&lt;SPAN&gt;Else&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;'Define the drawing&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&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;oDrawing&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;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Sheet&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;lPos&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Long&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;rPos&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Long&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sLen&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Long&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sSheetName&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;iSheetNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;

&lt;SPAN&gt;'step through each drawing sheet&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDrawing&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;

	&lt;SPAN&gt;'find the seperator in the sheet name:number&lt;/SPAN&gt;
	&lt;SPAN&gt;lPos&lt;/SPAN&gt; = &lt;SPAN&gt;InStr&lt;/SPAN&gt;(&lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;":"&lt;/SPAN&gt;)
	&lt;SPAN&gt;'find the number of characters in the sheet name&lt;/SPAN&gt;
	&lt;SPAN&gt;sLen&lt;/SPAN&gt; = &lt;SPAN&gt;Len&lt;/SPAN&gt;(&lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;)
	&lt;SPAN&gt;'find the sheet name&lt;/SPAN&gt;
	&lt;SPAN&gt;sSheetName&lt;/SPAN&gt; = &lt;SPAN&gt;Left&lt;/SPAN&gt;(&lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;lPos&lt;/SPAN&gt; -1)
	&lt;SPAN&gt;'find the sheet number&lt;/SPAN&gt;
	&lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt; = &lt;SPAN&gt;Right&lt;/SPAN&gt;(&lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;, &lt;SPAN&gt;sLen&lt;/SPAN&gt; - &lt;SPAN&gt;lPos&lt;/SPAN&gt;)
	&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;'set PDF Options&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oPDFAddIn&lt;/SPAN&gt;.&lt;SPAN&gt;HasSaveCopyAsOptions&lt;/SPAN&gt;(&lt;SPAN&gt;oDocument&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;"All_Color_AS_Black"&lt;/SPAN&gt;) = 1
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Remove_Line_Weights"&lt;/SPAN&gt;) = 1
&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&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;kPrintSheetRange&lt;/SPAN&gt;
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom_Begin_Sheet"&lt;/SPAN&gt;) = &lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt;
&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom_End_Sheet"&lt;/SPAN&gt;) = &lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Revision Number"&lt;/SPAN&gt;) &amp;gt;= &lt;SPAN&gt;"1"&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
&lt;SPAN&gt;ExportPath&lt;/SPAN&gt; = &lt;SPAN&gt;ExportPath&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;ExportPath&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oProject&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"-"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oPartNumber&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"-"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;" "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oDescription&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;".pdf"&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;oDocument&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;' Ask the user if he/she wants to open the file&lt;/SPAN&gt;
&lt;SPAN&gt;question2&lt;/SPAN&gt; = &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Open PDF file?"&lt;/SPAN&gt;, &lt;SPAN&gt;"PDF Created"&lt;/SPAN&gt;,&lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN&gt;YesNo&lt;/SPAN&gt;,&lt;SPAN&gt;MessageBoxIcon&lt;/SPAN&gt;.&lt;SPAN&gt;Question&lt;/SPAN&gt;)
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;question2&lt;/SPAN&gt; = &lt;SPAN&gt;vbYes&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
&lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Launch&lt;/SPAN&gt;(&lt;SPAN&gt;oDataMedium&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Catch&lt;/SPAN&gt;
&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"PDF not created, document may be open."&lt;/SPAN&gt;, &lt;SPAN&gt;"Please close and try again "&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;
&lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Victoria&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 19:42:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10807200#M42575</guid>
      <dc:creator>vickimclJRCYT</dc:creator>
      <dc:date>2021-12-07T19:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10807238#M42576</link>
      <description>&lt;P&gt;Try getting rid of that whole block of code for getting the sheet number, and all of the variables you created for it, then replace all of that with this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;iSheetNumber = oSheet.Name.Split(":")(1)&lt;/LI-CODE&gt;
&lt;P&gt;Split splits the name into multiple parts as an Array of String, and it will be split by the ":" character, so the resulting string array results in 2 parts...sheet name, then sheet number.&amp;nbsp; Then the (1) after the Split call is returning the second of the two parts (array's are zero based, so Item(0) is its first item).&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 19:59:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10807238#M42576</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-12-07T19:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10807339#M42577</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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply. I think I need a bit more help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should I be replacing this:&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="vickimclJRCYT_0-1638909543841.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/998489i908584F14CA874D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vickimclJRCYT_0-1638909543841.png" alt="vickimclJRCYT_0-1638909543841.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 20:40:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10807339#M42577</guid>
      <dc:creator>vickimclJRCYT</dc:creator>
      <dc:date>2021-12-07T20:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10807399#M42578</link>
      <description>&lt;P&gt;I think my problem is that it is not looping all sheets. Perhaps I need to re-arrange code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the dialog box in order to pick the location before save. However with more than one sheet, only one sheet is being saved. Hmm..&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 21:06:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10807399#M42578</guid>
      <dc:creator>vickimclJRCYT</dc:creator>
      <dc:date>2021-12-07T21:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809178#M42579</link>
      <description>&lt;P&gt;First of all...this is not a 'solution', just a tip of sorts.&amp;nbsp; I attempted to clean up your code a bit, but I still don't think it will function the way you are expecting, because the export process is exporting the entire document, not just a single sheet.&amp;nbsp; By the way, you had the keyword "Next" right after you got the sheet number, so that ended your loop of the sheets, instead of putting Next at the end of the code.&amp;nbsp; I moved some stuff around and eliminated a couple of other things that did not appear to be used or of any use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the cleaned up code, but as I said, it still won't export just one sheet at a time as it is...in fact, it will now likely try to export the same PDF (of the whole drawing document) as many times as there are sheets.&amp;nbsp; I doubt inputting the oSheet variable instead of the oDrawing variable as the first input variable of the SaveCopyAs method would work, even though it is defined as an 'Object', because a sheet is not a document by itself.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;'Define the drawing
Dim oDrawing As DrawingDocument = ThisDoc.Document

oDescription = iProperties.Value("Project", "Description")
oPartNumber = iProperties.Value("Project", "Part Number")
oProject = iProperties.Value("Project", "PROJECT")

Dim oPDFAddIn As TranslatorAddIn = ThisApplication.ApplicationAddIns.ItemById _
("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
'set PDF Options
If oPDFAddIn.HasSaveCopyAsOptions(oDrawing, oContext, oOptions) Then
	oOptions.Value("All_Color_AS_Black") = 1
	oOptions.Value("Remove_Line_Weights") = 1
	oOptions.Value("Vector_Resolution") = 400
	oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintSheetRange
	oOptions.Value("Custom_Begin_Sheet") = iSheetNumber
	oOptions.Value("Custom_End_Sheet") = iSheetNumber
End If

Dim ExportPath As String
' Define folder browse dialog
Dim Dialog = New FolderBrowserDialog()
Dialog.SelectedPath = "T:\ENG 3D\JOBS"
Dialog.ShowNewFolderButton = True
Dialog.Description = "Choose Folder for Export..."
If DialogResult.OK = Dialog.ShowDialog() Then
	ExportPath = Dialog.SelectedPath &amp;amp; "\"
Else
	Exit Sub
End If

'step through each drawing sheet
For Each oSheet As Sheet In oDrawing.Sheets
	iSheetNumber = oSheet.Name.Split(":")(1)
	oDataMedium.FileName = ExportPath &amp;amp; oProject &amp;amp; "-" &amp;amp; oPartNumber &amp;amp; "-" &amp;amp; iSheetNumber &amp;amp; " " &amp;amp; oDescription &amp;amp; ".pdf"
	Try
		oPDFAddIn.SaveCopyAs(oDrawing, oContext, oOptions, oDataMedium)
		' Ask the user if he/she wants to open the file
		question2 = MessageBox.Show("Open PDF file?", "PDF Created",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
		If question2 = vbYes Then
			ThisDoc.Launch(oDataMedium.FileName)
		End If
	Catch
		MessageBox.Show("PDF not created, document may be open.", "Please close and try again ")
	End Try
Next&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;To fix the one sheet at a time problem, I believe I have seen others copy each sheet out to another new temporary drawing document, then export that other drawing document, in order to get just that one sheet exported each time, then get rid of that other temporary drawing document when the process is done...all by code of course.&amp;nbsp; If that sounds like a plan that you would want to try, we can go from there.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 15:11:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809178#M42579</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-12-08T15:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809284#M42580</link>
      <description>&lt;P&gt;I went ahead and altered your code a bit more to explore the last idea I mentioned at the end of my last post, about copying each sheet over to a new temporary drawing, then exporting that other drawing.&amp;nbsp; I haven't tested it yet, because the file naming convention would not work for me, but you can try it out.&amp;nbsp; If you want, you could also specify the full file name of the drawing template file you want the other temporary drawing file to be created from, as the second input variable of the Documents.Add() method I'm using to create that other drawing.&amp;nbsp; Since that input variable is optional, and I don't know the path or name of your template, I just left it out or now.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;'Define the drawing
Dim oDrawing As DrawingDocument = ThisDoc.Document

oDescription = iProperties.Value("Project", "Description")
oPartNumber = iProperties.Value("Project", "Part Number")
oProject = iProperties.Value("Project", "PROJECT")

Dim oPDFAddIn As TranslatorAddIn = ThisApplication.ApplicationAddIns.ItemById _
("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
'set PDF Options
If oPDFAddIn.HasSaveCopyAsOptions(oDrawing, oContext, oOptions) Then
	oOptions.Value("All_Color_AS_Black") = 1
	oOptions.Value("Remove_Line_Weights") = 1
	oOptions.Value("Vector_Resolution") = 400
	oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintSheetRange
	oOptions.Value("Custom_Begin_Sheet") = iSheetNumber
	oOptions.Value("Custom_End_Sheet") = iSheetNumber
End If

Dim ExportPath As String
' Define folder browse dialog
Dim Dialog = New FolderBrowserDialog()
Dialog.SelectedPath = "T:\ENG 3D\JOBS"
Dialog.ShowNewFolderButton = True
Dialog.Description = "Choose Folder for Export..."
If DialogResult.OK = Dialog.ShowDialog() Then
	ExportPath = Dialog.SelectedPath &amp;amp; "\"
Else
	Exit Sub
End If

'step through each drawing sheet
For Each oSheet As Sheet In oDrawing.Sheets
	iSheetNumber = oSheet.Name.Split(":")(1)
	oDataMedium.FileName = ExportPath &amp;amp; oProject &amp;amp; "-" &amp;amp; oPartNumber &amp;amp; "-" &amp;amp; iSheetNumber &amp;amp; " " &amp;amp; oDescription &amp;amp; ".pdf"
	Dim oNewTempDrawing As DrawingDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kDrawingDocumentObject)
	'copy our sheet to the other drawing
	oOtherCopiedSheet = oSheet.CopyTo(oNewTempDrawing)
	'get rid of the default first sheet from that other drawing, leaving just our copied sheet
	oNewTempDrawing.Sheets.Item(1).Delete(False)
	
	Try
		oPDFAddIn.SaveCopyAs(oNewTempDrawing, oContext, oOptions, oDataMedium)
		' Ask the user if he/she wants to open the file
		question2 = MessageBox.Show("Open PDF file?", "PDF Created",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
		If question2 = vbYes Then
			ThisDoc.Launch(oDataMedium.FileName)
		End If
	Catch
		MessageBox.Show("PDF not created, document may be open.", "Please close and try again ")
	End Try
	oNewTempDrawing.Close(True) 'True = Skip Save
Next&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 15:49:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809284#M42580</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-12-08T15:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809303#M42581</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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for cleaning up the code and for your suggestions. As I mentioned, I pieced this together from 2 different sources and I'm slowly learning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When running the rule now on multiple sheets, it saves just the first sheet as sheet 1, 2, 3, ...etc.. The sheet numbers are working nice now (thank you) but as you said, I need to figure out how to get all the sheets, not just the first one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Victoria&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 15:59:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809303#M42581</guid>
      <dc:creator>vickimclJRCYT</dc:creator>
      <dc:date>2021-12-08T15:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809350#M42582</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11791194"&gt;@vickimclJRCYT&lt;/a&gt;&amp;nbsp; Is the task here to print to pdf each individual drawing sheet? If so the option would need to be change for each export as you loop through the collection.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 16:14:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809350#M42582</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2021-12-08T16:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809416#M42583</link>
      <description>&lt;P&gt;In my last post, we are creating the new temporary drawing document within the loop, and using that in the export method, and are setting the oDataMedium.FileName within the loop, but the oContext and oOptions are being created and set outside the loop.&amp;nbsp; I wouldn't think that it would make any difference if we moved the oContext &amp;amp; oOptions creation &amp;amp; setting down inside the loop.&amp;nbsp; But I did just notice how the last two oOptions items were set, which should probably be commented out or deleted.&amp;nbsp; They are trying to use the variable iSheetNumber to set begin and end sheets in a custom sheet range, and that variable has not even been created yet or had a value set until down within the loop.&amp;nbsp; Then I would probably also change that other option from "PrintRangeEnum.kPrintSheetRange" to "PrintRangeEnum.kPrintCurrentSheet".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;If oPDFAddIn.HasSaveCopyAsOptions(oDrawing, oContext, oOptions) Then
	oOptions.Value("All_Color_AS_Black") = 1
	oOptions.Value("Remove_Line_Weights") = 1
	oOptions.Value("Vector_Resolution") = 400
	oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintCurrentSheet
End If&lt;/LI-CODE&gt;
&lt;P&gt;I might also add in this line to ensure our copied sheet was the 'active' sheet, just after copying it over:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;oOtherCopiedSheet.Activate&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 16:35:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809416#M42583</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-12-08T16:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809545#M42584</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, exactly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 17:10:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809545#M42584</guid>
      <dc:creator>vickimclJRCYT</dc:creator>
      <dc:date>2021-12-08T17:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809560#M42585</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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Having a drawing with a part inserted only on the first sheet, when I run the code above, PDF's are saved out individually but I noticed the sheets were all labeled sheet 1 of 1, instead of sheet 1 of Total # of sheets like the idw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I decided to cut some sections through the part and put those sections on different sheets, so there was something on all the drawings. After doing that and running the rule, I get the following error:&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="vickimclJRCYT_0-1638983767204.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/998909i65864EBA27E5DB2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vickimclJRCYT_0-1638983767204.png" alt="vickimclJRCYT_0-1638983767204.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Man this ilogic stuff is tricky.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 17:17:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809560#M42585</guid>
      <dc:creator>vickimclJRCYT</dc:creator>
      <dc:date>2021-12-08T17:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809621#M42586</link>
      <description>&lt;P&gt;This rule works, the key thing here is to declare the sheet number as Integer as opposed to string or no declaration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As string the export will loop on the first sheet.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;

&lt;SPAN&gt;'Define the drawing&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&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;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;'step through each drawing sheet&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Sheet&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oDrawing&lt;/SPAN&gt;.&lt;SPAN&gt;Sheets&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt;
	&lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;.&lt;SPAN&gt;Split&lt;/SPAN&gt;(&lt;SPAN&gt;":"&lt;/SPAN&gt;)(1)
	
	&lt;SPAN&gt;Print&lt;/SPAN&gt;(&lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt;,&lt;SPAN&gt;oDrawing&lt;/SPAN&gt;)
&lt;SPAN&gt;Next&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;Print&lt;/SPAN&gt; (&lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&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;oDescription&lt;/SPAN&gt; = &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;)
&lt;SPAN&gt;oPartNumber&lt;/SPAN&gt; = &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;)
&lt;SPAN&gt;oProject&lt;/SPAN&gt; = &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"PROJECT"&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;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;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;'set PDF Options&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oPDFAddIn&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;"All_Color_AS_Black"&lt;/SPAN&gt;) = 1
	&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Remove_Line_Weights"&lt;/SPAN&gt;) = 1
	&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&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;kPrintSheetRange&lt;/SPAN&gt;
	&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt;, &lt;SPAN&gt;"Title"&lt;/SPAN&gt;)

	&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom_Begin_Sheet"&lt;/SPAN&gt;) = &lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt;
	&lt;SPAN&gt;oOptions&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom_End_Sheet"&lt;/SPAN&gt;) = &lt;SPAN&gt;iSheetNumber&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;ExportPath&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;
&lt;SPAN&gt;' Define folder browse dialog&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;Dialog&lt;/SPAN&gt; = &lt;SPAN&gt;New&lt;/SPAN&gt; &lt;SPAN&gt;FolderBrowserDialog&lt;/SPAN&gt;()
&lt;SPAN&gt;Dialog&lt;/SPAN&gt;.&lt;SPAN&gt;SelectedPath&lt;/SPAN&gt; = &lt;SPAN&gt;"T:\ENG 3D\JOBS"&lt;/SPAN&gt;
&lt;SPAN&gt;Dialog&lt;/SPAN&gt;.&lt;SPAN&gt;ShowNewFolderButton&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
&lt;SPAN&gt;Dialog&lt;/SPAN&gt;.&lt;SPAN&gt;Description&lt;/SPAN&gt; = &lt;SPAN&gt;"Choose Folder for Export..."&lt;/SPAN&gt;
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;DialogResult&lt;/SPAN&gt;.&lt;SPAN&gt;OK&lt;/SPAN&gt; = &lt;SPAN&gt;Dialog&lt;/SPAN&gt;.&lt;SPAN&gt;ShowDialog&lt;/SPAN&gt;() &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;ExportPath&lt;/SPAN&gt; = &lt;SPAN&gt;Dialog&lt;/SPAN&gt;.&lt;SPAN&gt;SelectedPath&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"\"&lt;/SPAN&gt;
&lt;SPAN&gt;Else&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;ExportPath&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oProject&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"-"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oPartNumber&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;"-"&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;iSheetNumber&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;" "&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;oDescription&lt;/SPAN&gt; &amp;amp; &lt;SPAN&gt;".pdf"&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;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;' Ask the user if he/she wants to open the file&lt;/SPAN&gt;
		&lt;SPAN&gt;question2&lt;/SPAN&gt; = &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Open PDF file?"&lt;/SPAN&gt;, &lt;SPAN&gt;"PDF Created"&lt;/SPAN&gt;,&lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN&gt;YesNo&lt;/SPAN&gt;,&lt;SPAN&gt;MessageBoxIcon&lt;/SPAN&gt;.&lt;SPAN&gt;Question&lt;/SPAN&gt;)
		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;question2&lt;/SPAN&gt; = &lt;SPAN&gt;vbYes&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
			&lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Launch&lt;/SPAN&gt;(&lt;SPAN&gt;oDataMedium&lt;/SPAN&gt;.&lt;SPAN&gt;FileName&lt;/SPAN&gt;)
		&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;Catch&lt;/SPAN&gt;
		&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"PDF not created, document may be open."&lt;/SPAN&gt;, &lt;SPAN&gt;"Please close and try again "&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 17:49:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809621#M42586</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2021-12-08T17:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809670#M42587</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt; &amp;amp; &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11791194"&gt;@vickimclJRCYT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was referencing a couple of my older custom codes I did for someone else in the past, in which they wanted the sheet numbers to be 1 of 1 instead of 1 of # or sheets.&amp;nbsp; In that example I needed to create the other temporary drawing file and copy the sheets over to it.&amp;nbsp; In your case, since you want the sheet names to remain as they are, that other temporary drawing document and copying process is not needed.&amp;nbsp; I just did a couple of tests of my own to prove the point (with different code not putting iProperty values in file names).&amp;nbsp; The code worked as planned...each sheet was exported separately, and individually looked just as they do in the drawing.&amp;nbsp; The trick was in setting each sheet as 'active' at the start of the loop, then having that one option set to kPrintCurrentSheet.&amp;nbsp; Everything else is just everything else.&amp;nbsp; I obviously don't do this process everyday, because I always export all sheets to one multi-page PDF, and don't include iProperty stuff in the file names.&lt;/P&gt;
&lt;P&gt;Just for reference though, here is the code I just tested with on my system.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kDrawingDocumentObject Then
		MsgBox("A Drawing Document must be active for this rule to work. Exiting.", vbCritical, "iLogic")
		Exit Sub
	End If
	Dim oDDoc As DrawingDocument = ThisApplication.ActiveDocument
	ExportAsPDF(oDDoc)
End Sub

Sub ExportAsPDF(oDrawDoc 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
	'or
	'Dim oPDFAddIn As TranslatorAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")

	'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
	
	'get static parts of new file name (not sheet depentant)
	oPath = System.IO.Path.GetDirectoryName(oDrawDoc.FullFileName)
	oName = System.IO.Path.GetFileNameWithoutExtension(oDrawDoc.FullFileName)
	oDirChr = System.IO.Path.DirectorySeparatorChar
	
	'record originally 'active' sheet
	oOrigActiveSheet = oDrawDoc.ActiveSheet
	'&amp;lt;&amp;lt;&amp;lt;&amp;lt; Start loop for each sheet - file name includes sheet name &amp;gt;&amp;gt;&amp;gt;&amp;gt;
	For Each oSheet As Sheet In oDrawDoc.Sheets
		oSheet.Activate
		oSheetNumber = oSheet.Name.Split(":")(1) 'get the digit(s) after the ":"
		oNewFileName = oPath &amp;amp; oDirChr &amp;amp; oName &amp;amp; " Sheet " &amp;amp; oSheetNumber &amp;amp; ".pdf"
		
		'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 Continue For
		End If
		
		oDataMedium.FileName = oNewFileName
		
		'The following If-Then statement defines the Options available, and their Values.
		If oPDFAddin.HasSaveCopyAsOptions(oDrawDoc, oContext, oOptions) Then
			oOptions.Value("Publish_All_Sheets") = 0 ' 0 = False, 1 = True
			oOptions.Value("Sheet_Range") = PrintRangeEnum.kPrintCurrentSheet
			oOptions.Value("Launch_Viewer") = 0 ' 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
		End If

		'Publish PDF
		oPDFAddin.SaveCopyAs(oDrawDoc, oContext, oOptions, oDataMedium)
	Next
	oOrigActiveSheet.Activate
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 18:10:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809670#M42587</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-12-08T18:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809678#M42588</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes it's working! Ah I see what you did. I'm learning a lot from you guys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Is there a way to have the dialog box only come up once for all sheets? Or is there no way around that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Victoria&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 18:11:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809678#M42588</guid>
      <dc:creator>vickimclJRCYT</dc:creator>
      <dc:date>2021-12-08T18:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809716#M42589</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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works too! And fast.&lt;/P&gt;&lt;P&gt;- I do like the dialog box though because we save to different folders depending on the job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Victoria&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 18:21:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809716#M42589</guid>
      <dc:creator>vickimclJRCYT</dc:creator>
      <dc:date>2021-12-08T18:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809731#M42590</link>
      <description>&lt;P&gt;No problem, I kind of stumbled across that error. If you type in the value it gets recognized as an integer straight away, I had another rule which had the declaration for integer so I was able to see what was missing, we are all learning.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AAcheson_0-1638987254248.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/998952iD153A656068CB840/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AAcheson_0-1638987254248.png" alt="AAcheson_0-1638987254248.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The API Help doesn't have any document's on the PDF export other than the sample and some basics so that would be no help either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can just move the dialogue box to the start I believe.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 18:27:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809731#M42590</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2021-12-08T18:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809734#M42591</link>
      <description>&lt;P&gt;If using &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt; code, you would have to move the folder browser code either out into its own Function, or move it up into the Sub Main area.&amp;nbsp; Right now, since it is within the Print sub routine, and that whole sub routine is being called to run for each sheet, it will want to launch for each sheet.&amp;nbsp; If you moved it up into your Sub Main area, you would then want to pass that folder data to the Print sub routine, so it can use it.&amp;nbsp; To do that, you would have to add that extra 'input' variable to the definition line of that Print sub routine, then just use that same variable as you use in the definition line down within that sub routine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If you move it out into its own Function, then you could use something like a SharedVariable to store the value from one loop to the next, then check to see if it has a value before calling that Function to run again...something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;If String.IsNullOrEmpty(ExportPath) Then
	ExportPath = GetFolder()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;that would prevent it from running when not needed.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 18:28:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809734#M42591</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-12-08T18:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809755#M42592</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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry you lost me. This is getting complicated (for me)...not you guys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Victoria&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 18:35:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809755#M42592</guid>
      <dc:creator>vickimclJRCYT</dc:creator>
      <dc:date>2021-12-08T18:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809775#M42593</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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like this:&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="vickimclJRCYT_0-1638989214349.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/998968i9C7A38577208A240/image-size/large?v=v2&amp;amp;px=999" role="button" title="vickimclJRCYT_0-1638989214349.png" alt="vickimclJRCYT_0-1638989214349.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I declare the GetFolder ()&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Victoria&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 18:47:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809775#M42593</guid>
      <dc:creator>vickimclJRCYT</dc:creator>
      <dc:date>2021-12-08T18:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Save to single-sheet PDF</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809789#M42594</link>
      <description>&lt;P&gt;Sorry about that.&amp;nbsp; I've got so much stuff going around in my head, sometimes I just rattle off a bunch of stuff too quickly, without proper explanations.&amp;nbsp; I started with the last working code that &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7946284"&gt;@A.Acheson&lt;/a&gt; posted, then made one of the modifications to it that I mentioned.&amp;nbsp; See if this works for you as planned.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	'Define the drawing
	Dim oDrawing As DrawingDocument = ThisDoc.Document

	'select folder to export to (runs our custom Function)
	Dim ExportPath As String = SelectFolder

	'step through each drawing sheet
	For Each oSheet As Sheet In oDrawing.Sheets
		'get sheet number
		Dim iSheetNumber As Integer = CInt(oSheet.Name.Split(":")(1))
		'run our custom Sub below to export the sheet to PDF
		Print(iSheetNumber, oDrawing, ExportPath)
	Next
End Sub

Function SelectFolder() As String
	Dim oFolder As String
	Dim Dialog = New FolderBrowserDialog
	Dialog.SelectedPath = "T:\ENG 3D\JOBS"
	Dialog.ShowNewFolderButton = True
	Dialog.Description = "Choose Folder for Export..."
	If DialogResult.OK = Dialog.ShowDialog() Then
		oFolder = Dialog.SelectedPath &amp;amp; "\"
	End If
	Return oFolder
End Function

Sub Print (iSheetNumber As Integer, oDrawing As DrawingDocument, ExportPath As String)
	oDescription = iProperties.Value("Project", "Description")
	oPartNumber = iProperties.Value("Project", "Part Number")
	oProject = iProperties.Value("Project", "PROJECT")

	Dim oPDFAddIn As TranslatorAddIn = ThisApplication.ApplicationAddIns.ItemById _
	("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
	oContext = ThisApplication.TransientObjects.CreateTranslationContext
	oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
	oOptions = ThisApplication.TransientObjects.CreateNameValueMap
	oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
	'set PDF Options
	If oPDFAddIn.HasSaveCopyAsOptions(oDrawing, oContext, oOptions) Then
		oOptions.Value("All_Color_AS_Black") = 1
		oOptions.Value("Remove_Line_Weights") = 1
		oOptions.Value("Vector_Resolution") = 400
		oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintSheetRange
		'MessageBox.Show(iSheetNumber, "Title")
		oOptions.Value("Custom_Begin_Sheet") = iSheetNumber
		oOptions.Value("Custom_End_Sheet") = iSheetNumber
	End If

oDataMedium.FileName = ExportPath &amp;amp; oProject &amp;amp; "-" &amp;amp; oPartNumber &amp;amp; "-" &amp;amp; iSheetNumber &amp;amp; " " &amp;amp; oDescription &amp;amp; ".pdf"
	Try
		oPDFAddIn.SaveCopyAs(oDrawing, oContext, oOptions, oDataMedium)
		' Ask the user if he/she wants to open the file
		question2 = MessageBox.Show("Open PDF file?", "PDF Created",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
		If question2 = vbYes Then
			ThisDoc.Launch(oDataMedium.FileName)
		End If
	Catch
		MessageBox.Show("PDF not created, document may be open.", "Please close and try again ")
	End Try
End Sub&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 08 Dec 2021 18:53:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/save-to-single-sheet-pdf/m-p/10809789#M42594</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-12-08T18:53:11Z</dc:date>
    </item>
  </channel>
</rss>

