<?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: Access part &amp;quot;Origin&amp;quot; folder via iLogic in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866545#M291602</link>
    <description>&lt;P&gt;*gazes in amazement* no, no, you speak the truth.... there is no spoon!&amp;nbsp;&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://forums.autodesk.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt; seriously, that code negates my whole reason for needing to do this. I had no idea I could just check if a plane was one of the origin planes. That makes this job so much easier. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New conspiracy theory: &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp;is the Oracle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Feb 2017 16:55:33 GMT</pubDate>
    <dc:creator>DRoam</dc:creator>
    <dc:date>2017-02-09T16:55:33Z</dc:date>
    <item>
      <title>Access part "Origin" folder via iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866215#M291600</link>
      <description>&lt;P&gt;I'm trying to write some code that will get the current names of the Origin work features. In order to do that, I need to access the origin folder. I'm close, but the code I have isn't working -- I think because it's meant to access Assembly folders, and the Origin folder is a special folder that isn't contained in this "set" (plus I'm in a Part which can't have folders).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is what I have. I need help with the lines in red: The one that accesses the Origin folder, which isn't working, as well as the lines that check if the node being checked is a Work Plane, Work Axis, or Work Point, since Inventor doesn't seem to like those either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oPlaneNames(3) As String
Dim oAxisNames(3) As String
Dim oCenterPointName As String

oPane = ThisApplication.ActiveDocument.BrowserPanes.Item("Model")
&lt;FONT color="#FF0000"&gt;oOriginFolder = oPane.TopNode.BrowserFolders.Item("Origin")&lt;/FONT&gt;
oOriginFolderNodes = oOriginFolder.BrowserNode.BrowserNodes
Dim PlaneCount As Integer = 0
Dim AxisCount As Integer = 0
For Each oNode As BrowserNode In oOriginFolderNodes
	oObject = oNode.NativeObject
	&lt;FONT color="#FF0000"&gt;If oObject = WorkPlane Then&lt;/FONT&gt;
		PlaneCount = PlaneCount + 1
		oPlaneNames(PlaneCount) = oObject.Name
	End If
	&lt;FONT color="#FF0000"&gt;If oObject = WorkAxis Then&lt;/FONT&gt;
		AxisCount = AxisCount + 1
		oAxisNames(AxisCount) = oObject.Name
	End If
	&lt;FONT color="#FF0000"&gt;If oObject = WorkPoint Then&lt;/FONT&gt;
		oCenterPointName = oObject.Name
	End If
Next&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 15:13:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866215#M291600</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2017-02-09T15:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Access part "Origin" folder via iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866457#M291601</link>
      <description>&lt;P&gt;Hi DRoam,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you're trying to "bend the spoon", without realizing &lt;A href="https://youtu.be/dzm8kTIj_0M" target="_blank"&gt;there is no spoon&lt;/A&gt;. &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's assume there is no folder. (edit: I should point out that I'm not saying that the there really isn't a folder that the API can grab, just that it's sometimes better when doing these things to assume that interface objects don't really exist)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead&amp;nbsp;we&amp;nbsp;can look at the workplanes &lt;STRONG&gt;collection&lt;/STRONG&gt;, and then use the IsCoordinateSystemElement &lt;STRONG&gt;property&lt;/STRONG&gt; to determine which ones are "origin" planes. Rinse and repeat for axes and points.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now we can bend the spoon. &lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://forums.autodesk.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;oDoc = ThisDoc.Document

'look at all planes
For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes
	'check if this is an origin plane
	If oWorkPlane.IsCoordinateSystemElement = True Then
	oMsg = oWorkPlane.Name
	MessageBox.Show(oMsg, "iLogic")
	End If
Next&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post back if this doesn't work (maybe you were trying to bend a spork?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also just a reminder, Inventor Customization forum:&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120" target="_blank"&gt;http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 16:49:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866457#M291601</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2017-02-09T16:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Access part "Origin" folder via iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866545#M291602</link>
      <description>&lt;P&gt;*gazes in amazement* no, no, you speak the truth.... there is no spoon!&amp;nbsp;&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://forums.autodesk.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt; seriously, that code negates my whole reason for needing to do this. I had no idea I could just check if a plane was one of the origin planes. That makes this job so much easier. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New conspiracy theory: &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp;is the Oracle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 16:55:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866545#M291602</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2017-02-09T16:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Access part "Origin" folder via iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866582#M291603</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1171223"&gt;@DRoam&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New conspiracy theory: &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt;&amp;nbsp;is the Oracle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;nope, that would be someone else, I'm just that bald kid that pulled his hair out in the past trying to bend a lot of spoons the hard way. &lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://forums.autodesk.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming there is no "spoon" to begin with is just a concept that helps us as users&amp;nbsp;(&amp;nbsp;who know interface items, better than the API ), get back behind the "curtain" more easily.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also in case you're trying to get a specific origin plane you can just use the collection item numbers to get them directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;oWPlanes = ThisDoc.Document.ComponentDefinition.WorkPlanes

oplane = oWPlanes.Item(1).Name 'YZ
MessageBox.Show(oplane, "iLogic")

oplane = oWPlanes.Item(2).Name 'XZ
MessageBox.Show(oplane, "iLogic")

oplane = oWPlanes.Item(3).Name 'XY
MessageBox.Show(oplane, "iLogic")
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:14:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866582#M291603</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2017-02-09T17:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Access part "Origin" folder via iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866824#M291604</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;nope, that would be someone else, I'm just that bald kid that pulled his hair out in the past trying to bend a lot of spoons the hard way. &lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://forums.autodesk.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;Lol, that adds a whole new dimension to that scene...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_W&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Also in case you're trying to get a specific origin plane you can just use the collection item numbers to get them directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Perfect. Thank you. Once again, you da man &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to ask.... so when you look at iLogic, do you even see the code? Or do you just see blonde view rep, brunette view rep, redhead view rep......&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 18:24:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866824#M291604</guid>
      <dc:creator>DRoam</dc:creator>
      <dc:date>2017-02-09T18:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Access part "Origin" folder via iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866877#M291605</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;DRoam wrote:
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to ask.... so when you look at iLogic, do you even see the code? Or do you just see blonde view rep, brunette view rep, redhead view rep......&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;lol, most of the time I just see "riddles" to be solved, occasionally where there's a really elegant solution, I see bugs bunny in a dress. &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://forums.autodesk.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 18:41:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/access-part-quot-origin-quot-folder-via-ilogic/m-p/6866877#M291605</guid>
      <dc:creator>Curtis_W</dc:creator>
      <dc:date>2017-02-09T18:41:45Z</dc:date>
    </item>
  </channel>
</rss>

