<?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 Print idw with BOM order in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8786177#M183169</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I try to print all idw related to an assembly used task scheduler, it's ok. But i want to print with right order as they were sorted in assembly BOM and it is very tedious because i must chose idw file one by one. Any solutions for me!? Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2019 01:42:00 GMT</pubDate>
    <dc:creator>aries.1482</dc:creator>
    <dc:date>2019-05-13T01:42:00Z</dc:date>
    <item>
      <title>Print idw with BOM order</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8786177#M183169</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I try to print all idw related to an assembly used task scheduler, it's ok. But i want to print with right order as they were sorted in assembly BOM and it is very tedious because i must chose idw file one by one. Any solutions for me!? Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 01:42:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8786177#M183169</guid>
      <dc:creator>aries.1482</dc:creator>
      <dc:date>2019-05-13T01:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Print idw with BOM order</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8786204#M183170</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1053519"&gt;@aries.1482&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;It is possible, you can export part list to xls and then copy to a txt file, leverage API with VBA code to print from this list one by one.&lt;/P&gt;
&lt;P&gt;Hope it helps!&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 02:12:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8786204#M183170</guid>
      <dc:creator>Xun.Zhang</dc:creator>
      <dc:date>2019-05-13T02:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Print idw with BOM order</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8786212#M183171</link>
      <description>&lt;P&gt;Thanks for reply, i think it is possible&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;; but i'm not friendly with VBA, can you post code here?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 02:23:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8786212#M183171</guid>
      <dc:creator>aries.1482</dc:creator>
      <dc:date>2019-05-13T02:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Print idw with BOM order</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8786237#M183172</link>
      <description>&lt;P&gt;Here is a sample file to export drawing to PDF with a list file for your reference.&lt;/P&gt;
&lt;P&gt;Hope it helps!&lt;/P&gt;
&lt;PRE&gt;Sub Main()
      
    Dim arrFileslist() As String
    arrFileslist = GetFilesFromTxt

    Dim iStep As Integer
    
    For iStep = 0 To UBound(arrFileslist)
    On Error Resume Next
            Set oDoc = ThisApplication.Documents.Open(arrFileslist(iStep), True)
            Call Export2PDF
    On Error GoTo 0
    Next
End Sub

'Get all files from txt files
Public Function GetFilesFromTxt() As String()
    Dim strLine As String
    Dim strFilesListArr() As String
    
    Dim k As Integer: k = 0
    Open sFilelistTxt For Input As #1
    Do Until EOF(1)
        Line Input #1, strLine
        ReDim Preserve strFilesListArr(k) As String
        strFilesListArr(k) = strLine
        k = k + 1
    Loop
    Close #1
    
    GetFilesFromTxt = strFilesListArr
End Function


Public Function Export2PDF()

Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument


'Dump PDF

Dim oPDFAddIn As TranslatorAddIn
Set oPDFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
Dim oContext As TranslationContext
Set oContext = ThisApplication.TransientObjects.CreateTranslationContext
        oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
Dim oOptions As NameValueMap
Set oOptions = ThisApplication.TransientObjects.CreateNameValueMap
Dim oDataMedium As DataMedium
Set oDataMedium = ThisApplication.TransientObjects.CreateDataMedium

Dim oPath As String
oPath = "C:\temp" ' PDF save folder

Dim oFileName As String
oFileName = oDoc.DisplayName

oDataMedium.FileName = oPath &amp;amp; "\" &amp;amp; oFileName &amp;amp; ".pdf"

Call oPDFAddIn.SaveCopyAs(oDoc, oContext, oOptions, oDataMedium)

Dim oSheets As Sheets
Set oSheets = oDoc.Sheets
For Each oSheet In oSheets
    FileName = oPath &amp;amp; "\" &amp;amp; oFileName &amp;amp; "_" &amp;amp; Left(oSheet.Name, Len(oSheet.Name) - 2) &amp;amp; ".dwg"
Next

Call oDoc.SaveAs(oPath &amp;amp; "\" &amp;amp; oFileName &amp;amp; ".dwg", True)

End Function&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 May 2019 02:53:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8786237#M183172</guid>
      <dc:creator>Xun.Zhang</dc:creator>
      <dc:date>2019-05-13T02:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Print idw with BOM order</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8788696#M183173</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the batch utility from Curtis, I use all the time.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-forum/batch-plot-pdf-vault-basic-append-iproperty-to-file-name/m-p/7636967#M674093" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/inventor-forum/batch-plot-pdf-vault-basic-append-iproperty-to-file-name/m-p/7636967#M674093&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Direct link to the batch tool.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-forum/any-way-to-automatically-update-all-related-drawings/m-p/6467841#M606820" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/inventor-forum/any-way-to-automatically-update-all-related-drawings/m-p/6467841#M606820&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 23:47:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/print-idw-with-bom-order/m-p/8788696#M183173</guid>
      <dc:creator>rhasell</dc:creator>
      <dc:date>2019-05-13T23:47:09Z</dc:date>
    </item>
  </channel>
</rss>

