<?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: Part Rule to Run while Edit in Place at Assembly Level in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/part-rule-to-run-while-edit-in-place-at-assembly-level/m-p/6961062#M71010</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3072914"&gt;@Owner2229&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worked like a charm.&amp;nbsp; Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate you showing me how to clean up my code a bit, too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Very much appreciated, Mike!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kenny&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2017 12:44:49 GMT</pubDate>
    <dc:creator>kennyj</dc:creator>
    <dc:date>2017-03-21T12:44:49Z</dc:date>
    <item>
      <title>Part Rule to Run while Edit in Place at Assembly Level</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/part-rule-to-run-while-edit-in-place-at-assembly-level/m-p/6960894#M71003</link>
      <description>&lt;P&gt;With the help of this forum, I have the following rule which works great a the part level, external rule.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My users though, have tried to run the rule while in an assembly, editing the part in place.&amp;nbsp; The rule as written adds the parameters at the assembly level, not to the activated part file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can one of you gurus show me how to have my rule apply the parameters to the part that is being edited not the assembly that the part was accessed from?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kenny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 6532 StartFragment: 314 EndFragment: 6500 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Sub&lt;/SPAN&gt; &lt;SPAN style="color: rgb(128, 0, 128); font-weight: bold;"&gt;Main&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;()&lt;/SPAN&gt;
&lt;SPAN style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: rgb(128, 0, 0);"&gt;oDoc&lt;/SPAN&gt; &lt;SPAN style="color: rgb(255, 0, 0); font-weight: bold;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: rgb(128, 0, 0);"&gt;PartDocument&lt;/SPAN&gt;
&lt;SPAN style="color: rgb(128, 0, 0);"&gt;oDoc&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 128); font-weight: bold;"&gt;ThisApplication&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;ActiveDocument&lt;/SPAN&gt;

&lt;SPAN style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: rgb(128, 0, 0);"&gt;oUserParam1&lt;/SPAN&gt; &lt;SPAN style="color: rgb(255, 0, 0); font-weight: bold;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: rgb(128, 0, 0);"&gt;UserParameter&lt;/SPAN&gt;
&lt;SPAN style="color: rgb(128, 0, 0);"&gt;oUserParam1&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;oDoc&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;ComponentDefinition&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;Parameters&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;UserParameters&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;AddByValue&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;CMF_COORD_X&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;UnitsTypeEnum&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;kFootLengthUnits&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;)&lt;/SPAN&gt;


&lt;SPAN style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: rgb(128, 0, 0);"&gt;oUserParam2&lt;/SPAN&gt; &lt;SPAN style="color: rgb(255, 0, 0); font-weight: bold;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: rgb(128, 0, 0);"&gt;UserParameter&lt;/SPAN&gt;
&lt;SPAN style="color: rgb(128, 0, 0);"&gt;oUserParam&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;oDoc&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;ComponentDefinition&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;Parameters&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;UserParameters&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;AddByValue&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;CMF_COORD_Y&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;UnitsTypeEnum&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;kFootLengthUnits&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;)&lt;/SPAN&gt;

&lt;SPAN style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: rgb(128, 0, 0);"&gt;oUserParam3&lt;/SPAN&gt; &lt;SPAN style="color: rgb(255, 0, 0); font-weight: bold;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: rgb(128, 0, 0);"&gt;UserParameter&lt;/SPAN&gt;
&lt;SPAN style="color: rgb(128, 0, 0);"&gt;oUserParam3&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;oDoc&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;ComponentDefinition&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;Parameters&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;UserParameters&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;AddByValue&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;CMF_COORD_Z&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 128, 128);"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;UnitsTypeEnum&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0);"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(128, 0, 0);"&gt;kFootLengthUnits&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-weight: bold;"&gt;)&lt;/SPAN&gt;


&lt;SPAN style="color: rgb(255, 0, 0); font-weight: bold;"&gt;End Sub&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 11:34:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/part-rule-to-run-while-edit-in-place-at-assembly-level/m-p/6960894#M71003</guid>
      <dc:creator>kennyj</dc:creator>
      <dc:date>2017-03-21T11:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Part Rule to Run while Edit in Place at Assembly Level</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/part-rule-to-run-while-edit-in-place-at-assembly-level/m-p/6960933#M71006</link>
      <description>&lt;P&gt;Hey Kenny, here you go:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
Dim oDoc As Object = ThisApplication.ActiveEditObject
If Not TypeOf oDoc Is PartDocument Then Exit Sub

Dim oUP As UserParameters = oDoc.ComponentDefinition.Parameters.UserParameters
Dim oUP1 As UserParameter = oUP.AddByValue("CMF_COORD_X", 0, UnitsTypeEnum.kFootLengthUnits)
Dim oUP2 As UserParameter = oUP.AddByValue("CMF_COORD_Y", 0, UnitsTypeEnum.kFootLengthUnits)
Dim oUP3 As UserParameter = oUP.AddByValue("CMF_COORD_Z", 0, UnitsTypeEnum.kFootLengthUnits)
End Sub&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 11:54:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/part-rule-to-run-while-edit-in-place-at-assembly-level/m-p/6960933#M71006</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2017-03-21T11:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Part Rule to Run while Edit in Place at Assembly Level</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/part-rule-to-run-while-edit-in-place-at-assembly-level/m-p/6961062#M71010</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3072914"&gt;@Owner2229&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worked like a charm.&amp;nbsp; Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate you showing me how to clean up my code a bit, too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Very much appreciated, Mike!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kenny&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 12:44:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/part-rule-to-run-while-edit-in-place-at-assembly-level/m-p/6961062#M71010</guid>
      <dc:creator>kennyj</dc:creator>
      <dc:date>2017-03-21T12:44:49Z</dc:date>
    </item>
  </channel>
</rss>

