<?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: WorkPoint in arbitrary position in an assembly file? in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/workpoint-in-arbitrary-position-in-an-assembly-file/m-p/6984398#M102135</link>
    <description>&lt;P&gt;Thanks! That did it!&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2017 13:20:39 GMT</pubDate>
    <dc:creator>oransen</dc:creator>
    <dc:date>2017-03-30T13:20:39Z</dc:date>
    <item>
      <title>WorkPoint in arbitrary position in an assembly file?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/workpoint-in-arbitrary-position-in-an-assembly-file/m-p/6978460#M102133</link>
      <description>&lt;P&gt;Even manually I'm not able to add a WorkPoint in an arbitrary position in an Assembly file, and not even on a Sketchpoint. But I noticed that the assembly document has a list of WorkPoints so I tried programatically adding a work point, but though there's no error return values the point does not seem to get added.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible either manually or programatically?&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;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CComPtr&amp;lt;WorkPoints&amp;gt; pWorkPointsList ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hRes = pAssemblyCompDef-&amp;gt;get_WorkPoints (&amp;amp;pWorkPointsList) ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FAILED(hRes) || (pWorkPointsList == nullptr)) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShowCOMError (hRes,L"could not get workpoint list") ; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CComPtr&amp;lt;Point&amp;gt; pPt; // Create a 3d point&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hRes = theApp.GetTransGeomPtr()-&amp;gt;CreatePoint(0.5,0.5,0.0,&amp;amp;pPt);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FAILED(hRes)) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShowCOMError (hRes,L" CreatePoint failed") ; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hRes = pWorkPointsList-&amp;gt;AddFixed (pPt,TRUE) ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FAILED(hRes)) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShowCOMError (hRes,L"AddDFixed failed") ; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 13:08:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/workpoint-in-arbitrary-position-in-an-assembly-file/m-p/6978460#M102133</guid>
      <dc:creator>oransen</dc:creator>
      <dc:date>2017-03-28T13:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: WorkPoint in arbitrary position in an assembly file?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/workpoint-in-arbitrary-position-in-an-assembly-file/m-p/6982934#M102134</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you try&amp;nbsp;changing the Construction&amp;nbsp;argument for AddFixed() to&amp;nbsp;&amp;nbsp;False?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the construction argument&amp;nbsp;is&amp;nbsp;True the WorkPoint&amp;nbsp;is getting created but you just don't see it in the UI.&amp;nbsp; Please let me know if your results are different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Wayne&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 22:37:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/workpoint-in-arbitrary-position-in-an-assembly-file/m-p/6982934#M102134</guid>
      <dc:creator>wayne.brill</dc:creator>
      <dc:date>2017-03-29T22:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: WorkPoint in arbitrary position in an assembly file?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/workpoint-in-arbitrary-position-in-an-assembly-file/m-p/6984398#M102135</link>
      <description>&lt;P&gt;Thanks! That did it!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 13:20:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/workpoint-in-arbitrary-position-in-an-assembly-file/m-p/6984398#M102135</guid>
      <dc:creator>oransen</dc:creator>
      <dc:date>2017-03-30T13:20:39Z</dc:date>
    </item>
  </channel>
</rss>

