<?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 Accessing Objects Hidden in API - Tweak Collection in ipn in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-objects-hidden-in-api-tweak-collection-in-ipn/m-p/6749583#M68641</link>
    <description>&lt;P&gt;Hi there, I'm writing a macro that allows me to select and object in an ipn environment and returns a list in a message box of all the tweaks the part is used in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In looking through the exposed API, from what I can tell the parts used in an ipn only contain information about the translation, and not about the actual tweak.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, each tweak does contain information about the sub components.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I am planning on iterating through each tweak and returning it if it references the component I have active in my select set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HOWEVER,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking through the API, it seems the only collection of tweaks I can access that are visible are through the browser nodes. Which is clunky and inefficient.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking through the PARENTS of the tweaks,&lt;/P&gt;
&lt;P&gt;It leads me through this maze of file types:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(PublicationTweakDefinition) &amp;gt; (PublicationMarkedView) &amp;gt; (Publication) &amp;gt; (PresentationDocument) &amp;gt; (Application)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So ideally, I would like to get the collection of PublicationTweakDefinitions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, as soon as I try to call&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;oDoc.Publications() it asks for the arguement of context, which is not documented anywhere in the API nor the Object Browser.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How am I supposed to proceed from here?&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2016 18:15:35 GMT</pubDate>
    <dc:creator>MechMachineMan</dc:creator>
    <dc:date>2016-12-14T18:15:35Z</dc:date>
    <item>
      <title>Accessing Objects Hidden in API - Tweak Collection in ipn</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-objects-hidden-in-api-tweak-collection-in-ipn/m-p/6749583#M68641</link>
      <description>&lt;P&gt;Hi there, I'm writing a macro that allows me to select and object in an ipn environment and returns a list in a message box of all the tweaks the part is used in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In looking through the exposed API, from what I can tell the parts used in an ipn only contain information about the translation, and not about the actual tweak.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, each tweak does contain information about the sub components.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I am planning on iterating through each tweak and returning it if it references the component I have active in my select set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HOWEVER,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking through the API, it seems the only collection of tweaks I can access that are visible are through the browser nodes. Which is clunky and inefficient.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking through the PARENTS of the tweaks,&lt;/P&gt;
&lt;P&gt;It leads me through this maze of file types:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(PublicationTweakDefinition) &amp;gt; (PublicationMarkedView) &amp;gt; (Publication) &amp;gt; (PresentationDocument) &amp;gt; (Application)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So ideally, I would like to get the collection of PublicationTweakDefinitions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, as soon as I try to call&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;oDoc.Publications() it asks for the arguement of context, which is not documented anywhere in the API nor the Object Browser.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How am I supposed to proceed from here?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 18:15:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-objects-hidden-in-api-tweak-collection-in-ipn/m-p/6749583#M68641</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2016-12-14T18:15:35Z</dc:date>
    </item>
  </channel>
</rss>

