<?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: How do I check Parts List exists vba? in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-check-parts-list-exists-vba/m-p/7671063#M94232</link>
    <description>&lt;P&gt;Accept as solution?&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jan 2018 05:46:15 GMT</pubDate>
    <dc:creator>dgreatice</dc:creator>
    <dc:date>2018-01-08T05:46:15Z</dc:date>
    <item>
      <title>How do I check Parts List exists vba?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-check-parts-list-exists-vba/m-p/7670761#M94229</link>
      <description>&lt;P&gt;I find this code. It's good work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/place-parts-list/m-p/5841794/highlight/true#M58909" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/place-parts-list/m-p/5841794/highlight/true#M58909&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but Do not check &amp;nbsp;Parts List exists.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to add a check function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="color: #800000; font-weight: bold;"&gt;Sub&lt;/SPAN&gt; CreatePartsList&lt;SPAN style="color: #808030;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #808030;"&gt;)&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;'On Error Resume Next&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;' Set a reference to the drawing document.&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;' This assumes a drawing document is active.&lt;/SPAN&gt;
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; oDrawDoc &lt;SPAN style="color: #800000; font-weight: bold;"&gt;As&lt;/SPAN&gt; DrawingDocument
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Set&lt;/SPAN&gt; oDrawDoc &lt;SPAN style="color: #808030;"&gt;=&lt;/SPAN&gt; ThisApplication&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;ActiveDocument
&lt;SPAN style="color: #696969;"&gt;'Set a reference to the active sheet.&lt;/SPAN&gt;
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; oSheet &lt;SPAN style="color: #800000; font-weight: bold;"&gt;As&lt;/SPAN&gt; Sheet
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Set&lt;/SPAN&gt; oSheet &lt;SPAN style="color: #808030;"&gt;=&lt;/SPAN&gt; oDrawDoc&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;ActiveSheet
&lt;SPAN style="color: #696969;"&gt;' Set a reference to the first drawing view on&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;' the sheet. This assumes the first drawing&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;' view on the sheet is not a draft view.&lt;/SPAN&gt;
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; oDrawingView &lt;SPAN style="color: #800000; font-weight: bold;"&gt;As&lt;/SPAN&gt; DrawingView
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Set&lt;/SPAN&gt; oDrawingView &lt;SPAN style="color: #808030;"&gt;=&lt;/SPAN&gt; oSheet&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;DrawingViews&lt;SPAN style="color: #808030;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #008c00;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #808030;"&gt;)&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;' Set a reference to th sheet's border&lt;/SPAN&gt;
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; oBorder &lt;SPAN style="color: #800000; font-weight: bold;"&gt;As&lt;/SPAN&gt; Border
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Set&lt;/SPAN&gt; oBorder &lt;SPAN style="color: #808030;"&gt;=&lt;/SPAN&gt; oSheet&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;Border
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; oPlacementPoint &lt;SPAN style="color: #800000; font-weight: bold;"&gt;As&lt;/SPAN&gt; Point2d
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #808030;"&gt;Not&lt;/SPAN&gt; oBorder &lt;SPAN style="color: #808030;"&gt;Is&lt;/SPAN&gt; &lt;SPAN style="color: #800000; font-weight: bold;"&gt;Nothing&lt;/SPAN&gt; &lt;SPAN style="color: #800000; font-weight: bold;"&gt;Then&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;' A border exists. The placement point&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;' is the top-right corner of the border.&lt;/SPAN&gt;
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Set&lt;/SPAN&gt; oPlacementPoint &lt;SPAN style="color: #808030;"&gt;=&lt;/SPAN&gt; oBorder&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;RangeBox&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;MaxPoint
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Else&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;' There is no border. The placement point&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;' is the top-right corner of the sheet.&lt;/SPAN&gt;
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Set&lt;/SPAN&gt; oPlacementPoint &lt;SPAN style="color: #808030;"&gt;=&lt;/SPAN&gt; ThisApplication&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;TransientGeometry&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;CreatePoint2d&lt;SPAN style="color: #808030;"&gt;(&lt;/SPAN&gt;oSheet&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;Width, oSheet&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;Height&lt;SPAN style="color: #808030;"&gt;)&lt;/SPAN&gt;
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;End If&lt;/SPAN&gt;
&lt;SPAN style="color: #696969;"&gt;' Create the parts list.&lt;/SPAN&gt;
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; oPartsList &lt;SPAN style="color: #800000; font-weight: bold;"&gt;As&lt;/SPAN&gt; PartsList
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;Set&lt;/SPAN&gt; oPartsList &lt;SPAN style="color: #808030;"&gt;=&lt;/SPAN&gt; oSheet&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;PartsLists&lt;SPAN style="color: #008c00;"&gt;.&lt;/SPAN&gt;Add&lt;SPAN style="color: #808030;"&gt;(&lt;/SPAN&gt;oDrawingView, oPlacementPoint&lt;SPAN style="color: #808030;"&gt;)&lt;/SPAN&gt;
&lt;SPAN style="color: #800000; font-weight: bold;"&gt;End Sub&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 01:31:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-check-parts-list-exists-vba/m-p/7670761#M94229</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-08T01:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check Parts List exists vba?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-check-parts-list-exists-vba/m-p/7670925#M94230</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To check if partslist table already exist add more code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Public&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt; CreatePartsList&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'On Error Resume Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;' Set a reference to the drawing document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;' This assumes a drawing document is active.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; oDrawDoc &lt;SPAN&gt;As&lt;/SPAN&gt; DrawingDocument&lt;BR /&gt;&lt;SPAN&gt;Set&lt;/SPAN&gt; oDrawDoc &lt;SPAN&gt;=&lt;/SPAN&gt; ThisApplication&lt;SPAN&gt;.&lt;/SPAN&gt;ActiveDocument&lt;BR /&gt;&lt;SPAN&gt;'Set a reference to the active sheet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; oSheet &lt;SPAN&gt;As&lt;/SPAN&gt; Sheet&lt;BR /&gt;&lt;SPAN&gt;Set&lt;/SPAN&gt; oSheet &lt;SPAN&gt;=&lt;/SPAN&gt; oDrawDoc&lt;SPAN&gt;.&lt;/SPAN&gt;ActiveSheet&lt;BR /&gt;&lt;SPAN&gt;' Set a reference to the first drawing view on&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;' the sheet. This assumes the first drawing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;' view on the sheet is not a draft view.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; oDrawingView &lt;SPAN&gt;As&lt;/SPAN&gt; DrawingView&lt;BR /&gt;&lt;SPAN&gt;Set&lt;/SPAN&gt; oDrawingView &lt;SPAN&gt;=&lt;/SPAN&gt; oSheet&lt;SPAN&gt;.&lt;/SPAN&gt;DrawingViews&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;' Set a reference to th sheet's border&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; oBorder &lt;SPAN&gt;As&lt;/SPAN&gt; Border&lt;BR /&gt;&lt;SPAN&gt;Set&lt;/SPAN&gt; oBorder &lt;SPAN&gt;=&lt;/SPAN&gt; oSheet&lt;SPAN&gt;.&lt;/SPAN&gt;Border&lt;BR /&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; oPlacementPoint &lt;SPAN&gt;As&lt;/SPAN&gt; Point2d&lt;BR /&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;Not&lt;/SPAN&gt; oBorder &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;' A border exists. The placement point&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;' is the top-right corner of the border.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set&lt;/SPAN&gt; oPlacementPoint &lt;SPAN&gt;=&lt;/SPAN&gt; oBorder&lt;SPAN&gt;.&lt;/SPAN&gt;RangeBox&lt;SPAN&gt;.&lt;/SPAN&gt;MaxPoint&lt;BR /&gt;&lt;SPAN&gt;Else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;' There is no border. The placement point&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;' is the top-right corner of the sheet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set&lt;/SPAN&gt; oPlacementPoint &lt;SPAN&gt;=&lt;/SPAN&gt; ThisApplication&lt;SPAN&gt;.&lt;/SPAN&gt;TransientGeometry&lt;SPAN&gt;.&lt;/SPAN&gt;CreatePoint2d&lt;SPAN&gt;(&lt;/SPAN&gt;oSheet&lt;SPAN&gt;.&lt;/SPAN&gt;Width, oSheet&lt;SPAN&gt;.&lt;/SPAN&gt;Height&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;' Create the parts list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; oPartsList &lt;SPAN&gt;As&lt;/SPAN&gt; PartsList&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;on error resume next&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;&lt;SPAN&gt;Set&lt;/SPAN&gt; oPartsList &lt;SPAN&gt;=&lt;/SPAN&gt; oSheet&lt;SPAN&gt;.&lt;/SPAN&gt;PartsLists&lt;SPAN&gt;.&lt;/SPAN&gt;item(1)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;if err.number &amp;lt;&amp;gt; 0 then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;&lt;SPAN&gt;Set&lt;/SPAN&gt; oPartsList &lt;SPAN&gt;=&lt;/SPAN&gt; oSheet&lt;SPAN&gt;.&lt;/SPAN&gt;PartsLists&lt;SPAN&gt;.&lt;/SPAN&gt;Add&lt;SPAN&gt;(&lt;/SPAN&gt;oDrawingView, oPlacementPoint&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;&lt;SPAN&gt;'Do Nothing or if you want to edit existing&amp;nbsp;partlist&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#ff0000"&gt;end if&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 02:51:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-check-parts-list-exists-vba/m-p/7670925#M94230</guid>
      <dc:creator>dgreatice</dc:creator>
      <dc:date>2018-01-08T02:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check Parts List exists vba?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-check-parts-list-exists-vba/m-p/7670992#M94231</link>
      <description>&lt;P&gt;Thank you~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's work. Very well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 03:58:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-check-parts-list-exists-vba/m-p/7670992#M94231</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-08T03:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I check Parts List exists vba?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-check-parts-list-exists-vba/m-p/7671063#M94232</link>
      <description>&lt;P&gt;Accept as solution?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 05:46:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-check-parts-list-exists-vba/m-p/7671063#M94232</guid>
      <dc:creator>dgreatice</dc:creator>
      <dc:date>2018-01-08T05:46:15Z</dc:date>
    </item>
  </channel>
</rss>

