<?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: iLogic Custom iProperty not updating in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874574#M118168</link>
    <description>&lt;P&gt;Thank you for your reply&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9053366"&gt;@FINET_Laurent&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;RESTMAAT = 0 (if RESTMAAT &amp;gt; 50) was just an example, but a bad example (this line doesn't matter though).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If RESTMAAT &amp;lt;= 50 then the property of the part "BA50rs" is set. If RESTMAAT &amp;gt; 50 then the property of the part "BA70rs" is set. So I have to include the iProperty.Value within the statements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2020 08:52:52 GMT</pubDate>
    <dc:creator>L.Greft</dc:creator>
    <dc:date>2020-11-17T08:52:52Z</dc:date>
    <item>
      <title>iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874499#M118165</link>
      <description>&lt;P&gt;Hello, I've made a rule in an assembly that updates a custom property within a part. Depending on the parameter "RESTMAAT" one of the parts custom property is updated. The first time when I change a parameter in the assembly the parameter gets updated, but the property doesn't update. If I run the rule again then the property also updates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do I have to change in my rule so the property updates the first time the rule is run?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If RESTMAAT &amp;lt;= 50 Then
	If RESTMAAT = 0 Then
		ZAAGMAAT = 0
	Else
		ZAAGMAAT = Floor(23 + Sqrt(2) * RESTMAAT) + 0.99
	End If
	
	iProperties.Value("BA50rs", "Custom", "ISAH-Memo") = FormatAsFraction(ZAAGMAAT, 2)
	
ElseIf RESTMAAT &amp;gt; 50 Then
	If RESTMAAT = 0 Then
		ZAAGMAAT = 0
	Else
		ZAAGMAAT = Floor(8 + Sqrt(2) * RESTMAAT) + 0.99
	End If
	
	iProperties.Value("BA70rs", "Custom", "ISAH-Memo") = FormatAsFraction(ZAAGMAAT, 2)

End If

InventorVb.DocumentUpdate()
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 08:05:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874499#M118165</guid>
      <dc:creator>L.Greft</dc:creator>
      <dc:date>2020-11-17T08:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874562#M118167</link>
      <description>&lt;P&gt;Morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, in the case where RESTMAAT is greater than 50, I don't see how it could be 0, so I'd remove the if/else statement there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next I'd move the iProperty.Value out of the statements, after the parameter is set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like so :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;RESTMAAT&lt;/SPAN&gt; &amp;lt;= 50 &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;
	
	&lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;RESTMAAT&lt;/SPAN&gt; = 0 &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;ZAAGMAAT&lt;/SPAN&gt; = 0
	
	&lt;SPAN style="color: #ff0000;"&gt;Else&lt;/SPAN&gt;
		&lt;SPAN style="color: #800000;"&gt;ZAAGMAAT&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Floor&lt;/SPAN&gt;(23 + &lt;SPAN style="color: #800000;"&gt;Sqrt&lt;/SPAN&gt;(2) * &lt;SPAN style="color: #800000;"&gt;RESTMAAT&lt;/SPAN&gt;) + 0.99
	
	&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;
	

	
&lt;SPAN style="color: #ff0000;"&gt;ElseIf&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;RESTMAAT&lt;/SPAN&gt; &amp;gt; 50 &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;

		&lt;SPAN style="color: #800000;"&gt;ZAAGMAAT&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;Floor&lt;/SPAN&gt;(8 + &lt;SPAN style="color: #800000;"&gt;Sqrt&lt;/SPAN&gt;(2) * &lt;SPAN style="color: #800000;"&gt;RESTMAAT&lt;/SPAN&gt;) + 0.99
	


&lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;

&lt;SPAN style="color: #800080;"&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;Value&lt;/SPAN&gt;(&lt;SPAN style="color: #008080;"&gt;"BA50rs"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN style="color: #008080;"&gt;"ISAH-Memo"&lt;/SPAN&gt;) = &lt;SPAN style="color: #800080;"&gt;FormatAsFraction&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;ZAAGMAAT&lt;/SPAN&gt;, 2)

&lt;SPAN style="color: #800080;"&gt;InventorVb&lt;/SPAN&gt;.&lt;SPAN style="color: #800080;"&gt;DocumentUpdate&lt;/SPAN&gt;()&lt;/PRE&gt;&lt;P&gt;Maybe this does the trick ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FINET L.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 08:43:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874562#M118167</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2020-11-17T08:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874574#M118168</link>
      <description>&lt;P&gt;Thank you for your reply&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9053366"&gt;@FINET_Laurent&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;RESTMAAT = 0 (if RESTMAAT &amp;gt; 50) was just an example, but a bad example (this line doesn't matter though).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If RESTMAAT &amp;lt;= 50 then the property of the part "BA50rs" is set. If RESTMAAT &amp;gt; 50 then the property of the part "BA70rs" is set. So I have to include the iProperty.Value within the statements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 08:52:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874574#M118168</guid>
      <dc:creator>L.Greft</dc:creator>
      <dc:date>2020-11-17T08:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874584#M118169</link>
      <description>&lt;P&gt;Indeed , my mistake.&lt;/P&gt;&lt;P&gt;Can you check the in the option tab of the rule if the rule is run automaticaly ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 08:57:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874584#M118169</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2020-11-17T08:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874598#M118171</link>
      <description>&lt;P&gt;It runs automatically&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Rule Options.PNG" style="width: 383px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/845141i993E46C1A427AE2E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rule Options.PNG" alt="Rule Options.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:02:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874598#M118171</guid>
      <dc:creator>L.Greft</dc:creator>
      <dc:date>2020-11-17T09:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874620#M118172</link>
      <description>&lt;P&gt;Interestring, I don't have a clue why this doesn't work..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A work around whould be to fire the rule each time you change a parameter, using for instance Triggers ? This is easy to do. Are you familiar witht those ?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:14:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874620#M118172</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2020-11-17T09:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874634#M118173</link>
      <description>&lt;P&gt;I am familiar with Triggers, but I prefer not to use them. The model that includes this code will be used next month, so for now I will wait (and hope) for another solution, otherwise I will use the trigger.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Forgot to mention in my first post, I use Inventor 2019.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:21:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874634#M118173</guid>
      <dc:creator>L.Greft</dc:creator>
      <dc:date>2020-11-17T09:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874641#M118174</link>
      <description>&lt;P&gt;I'dd still pull the iproperty.Value out of the if statement.&lt;/P&gt;&lt;P&gt;or maybe add a document update right before changing the iproperty value ?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:33:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874641#M118174</guid>
      <dc:creator>FINET_Laurent</dc:creator>
      <dc:date>2020-11-17T09:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874680#M118176</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9053366"&gt;@FINET_Laurent&lt;/a&gt;&amp;nbsp; Maybe you should modify the code. This code has to run from assembly, right&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9265722"&gt;@L.Greft&lt;/a&gt;&amp;nbsp;?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:39:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874680#M118176</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-17T09:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874700#M118177</link>
      <description>&lt;P&gt;Indeed, it&amp;nbsp;&lt;SPAN&gt;has to run from the assembly&lt;/SPAN&gt;&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:47:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874700#M118177</guid>
      <dc:creator>L.Greft</dc:creator>
      <dc:date>2020-11-17T09:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Custom iProperty not updating</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874714#M118179</link>
      <description>Im a bit busy rightnow doing autocad... &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt; so here is one example.&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/run-rule-for-all-subbassebly-files-in-inventor/td-p/9852143" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/run-rule-for-all-subbassebly-files-in-inventor/td-p/9852143&lt;/A&gt;</description>
      <pubDate>Tue, 17 Nov 2020 09:52:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-custom-iproperty-not-updating/m-p/9874714#M118179</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-17T09:52:58Z</dc:date>
    </item>
  </channel>
</rss>

