<?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: Is there a faster way? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6264459#M63062</link>
    <description>&lt;P&gt;Hello Kirk,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure what is causing the error just looking at the code. Can you upload a small assembly that will allow me to recreate the error? If you want to keep it private you can send it to wayne.brill@autodesk.com&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>Mon, 11 Apr 2016 20:34:07 GMT</pubDate>
    <dc:creator>wayne.brill</dc:creator>
    <dc:date>2016-04-11T20:34:07Z</dc:date>
    <item>
      <title>Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6249929#M62855</link>
      <description>&lt;P&gt;I have a ilogic code that changes all my memebers lengths by a specific amount. &lt;A href="https://forums.autodesk.com/t5/inventor-customization/change-ipart-member-with-ilogic/td-p/6219938" target="_self"&gt;The code is here in this thread&lt;/A&gt;. &amp;nbsp;The line&amp;nbsp;that changes the member is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;i = iPart.FindRow(comp.Name, "Length", "=", oLength&lt;/STRONG&gt;&lt;/EM&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem that I have is that this iPart has&amp;nbsp;a couple thousand rows (not exactly sure how many... I just know it a lot). &amp;nbsp;When the code runs, it will take over 6 minutes to change out two parts. &amp;nbsp;The CPU is running at 25-26% during this time, so its working hard at it. If I manually change the components, it will take the ipart table about 45 seconds to come up so I can change the part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I take it that the code is actually running thru the table until it finds a match. Since the table is rather large, it takes awhile to scan thru it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a faster way to set the member?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kirk&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 12:55:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6249929#M62855</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-04-04T12:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6249999#M62857</link>
      <description>&lt;P&gt;Could you post the code you are really using? Or is the accepted as solution the real code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 13:26:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6249999#M62857</guid>
      <dc:creator>Jef_E</dc:creator>
      <dc:date>2016-04-04T13:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6250051#M62861</link>
      <description>&lt;P&gt;I don't have the exact code with me at the moment. &amp;nbsp;It is very similar to the accepted solution. &amp;nbsp;The code gathers some information about the current row before it gets to the for/next with the "i = iPart.FindRow(comp.Name, "Length", "=", oLength) " line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can post the entire code later this afternoon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kirk&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 13:46:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6250051#M62861</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-04-04T13:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6250246#M62867</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/83823"&gt;@karthur1&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;I don't have the exact code with me at the moment. &amp;nbsp;It is very similar to the accepted solution. &amp;nbsp;The code gathers some information about the current row before it gets to the for/next with the "i = iPart.FindRow(comp.Name, "Length", "=", oLength) " line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can post the entire code later this afternoon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kirk&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That would be helpfull.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 14:48:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6250246#M62867</guid>
      <dc:creator>Jef_E</dc:creator>
      <dc:date>2016-04-04T14:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6251254#M62882</link>
      <description>&lt;P&gt;Below is the entire code. &amp;nbsp;I just looked at the ipart and it has&amp;nbsp;3,683 rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kirk&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;oLength = InputBox("Enter the length change (+ or -)in inches.", "iLogic", "0.25")&lt;BR /&gt;Dim oAsmDoc as Inventor.AssemblyDocument&lt;BR /&gt;oAsmDoc = ThisDoc.Document&lt;BR /&gt;Dim comp As Inventor.ComponentOccurrence &lt;BR /&gt;For Each comp In oAsmDoc.ComponentDefinition.Occurrences&lt;BR /&gt; rowName = iPart.RowName(comp.Name)&lt;BR /&gt; RowValue=iPart.CurrentRowValue("Cutlength")&lt;BR /&gt; StockNoStringValue=iPart.CurrentRowStringValue("Stock Number")&lt;BR /&gt; NewLength=RowValue+oLength&lt;BR /&gt; MemberStringValue=StockNoStringValue &amp;amp; "-" &amp;amp; NewLength&lt;BR /&gt; i = iPart.FindRow(comp.Name, "Member", "=", MemberStringValue) &lt;BR /&gt; If i &amp;lt; 0 Then&lt;BR /&gt; MessageBox.Show("Some problem occurred", "iLogic")&lt;BR /&gt; Else&lt;BR /&gt; 'MessageBox.Show("iPart set to row: " &amp;amp; MemberStringValue , "Change ALL members iLogic")&lt;BR /&gt; End If&lt;BR /&gt;Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 00:17:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6251254#M62882</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-04-05T00:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6251534#M62886</link>
      <description>&lt;P&gt;Maybe, you can save the row into a variable. And then refer to that variable instead of looking into the table's current row. Don't know if it would do much. But maybe a little.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim iPartRow As iPartTableRow&lt;/PRE&gt;&lt;P&gt;What I don't quite understand, is this line. Does it also activate the new found row?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;i = iPart.FindRow(comp.Name, "Member", "=", MemberStringValue)&lt;/PRE&gt;&lt;P&gt;Maybe you can shorten you code a little. The rowName varaible is unused? you should delete or comment it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is you loop;&lt;/P&gt;&lt;PRE&gt;Dim comp As Inventor.ComponentOccurrence
For Each comp In oAsmDoc.ComponentDefinition.Occurrences

	rowName = iPart.RowName(comp.Name)
	RowValue = iPart.CurrentRowValue("Cutlength")
	StockNoStringValue = iPart.CurrentRowStringValue("Stock Number")
	NewLength = RowValue + oLength
	MemberStringValue = StockNoStringValue &amp;amp; "-" &amp;amp; NewLength
	
	i = iPart.FindRow(comp.Name, "Member", "=", MemberStringValue)
	If i &amp;lt; 0 Then
		MessageBox.Show("Some problem occurred", "iLogic")
	Else
		'MessageBox.Show("iPart set to row: " &amp;amp; MemberStringValue , "Change ALL members iLogic")
	End If
Next&lt;/PRE&gt;&lt;P&gt;In short it could also be this, same effect ( haven't tested it ).&lt;/P&gt;&lt;P&gt;Also I have no idea if this has a real impact on the speed. But you could give it a shot. (let me know the result, i'm just learning to code efficiently myself).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim comp As Inventor.ComponentOccurrence
For Each comp In oAsmDoc.ComponentDefinition.Occurrences

	MemberStringValue = iPart.CurrentRowStringValue("Stock Number") &amp;amp; "-" &amp;amp; iPart.CurrentRowValue("Cutlength") + oLength
	
	i = iPart.FindRow(comp.Name, "Member", "=", MemberStringValue)
	If i &amp;lt; 0 Then
		MessageBox.Show("Some problem occurred", "iLogic")
	Else
		'MessageBox.Show("iPart set to row: " &amp;amp; MemberStringValue , "Change ALL members iLogic")
	End If
Next&lt;/PRE&gt;&lt;P&gt;I also have a question about the IF ELSE END IF statement on the end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i = the row number and when there is a error, it goes to -1 or how does this check work? I don't have a clue &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;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;	i = iPart.FindRow(comp.Name, "Member", "=", MemberStringValue)
	If i &amp;lt; 0 Then
		MessageBox.Show("Some problem occurred", "iLogic")
	Else
		'MessageBox.Show("iPart set to row: " &amp;amp; MemberStringValue , "Change ALL members iLogic")
	End If&lt;/PRE&gt;&lt;P&gt;Hope you find this post helpfull.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 06:58:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6251534#M62886</guid>
      <dc:creator>Jef_E</dc:creator>
      <dc:date>2016-04-05T06:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6253473#M62924</link>
      <description>&lt;P&gt;Jeff,&lt;/P&gt;
&lt;P&gt;From&amp;nbsp;the help in the iLogic, the FindRow command will find the row that mets the condition and change to that row if found.... if not, it sets i=-1. So the error check at the end is so that if i=-1, it will give a message that something went wrong.... otherwise it assumes it completed successfully and continues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I comment out the line "rowName = iPart.RowName(comp.Name)".... I then get the error of:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"iPart.CurrentRowValue("Cutlength"): &amp;nbsp;This function was called without a previous call to iPart.ChangeRow or iPart.FindRow.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe there is a way to avoid this, but I am not sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kirk&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 00:24:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6253473#M62924</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-04-06T00:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6253567#M62926</link>
      <description>&lt;P&gt;I had an idea of rather than searching the table for the correct value, I would just tell it what value to set it to. It seems that the command&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"i&lt;EM&gt;&lt;STRONG&gt;Part.ChangeRow("iComponentName:1", "RowMemberName")&lt;/STRONG&gt;&lt;/EM&gt; &amp;nbsp;" &amp;nbsp;would do exactly what I need. &amp;nbsp;The code would work something like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start with the first iPart.. Get its Component Name and length. &amp;nbsp;Add the increment to the length.... then change this with the "&lt;EM&gt;&lt;STRONG&gt;iPart.ChangeRow&lt;/STRONG&gt;&lt;/EM&gt; " command. &amp;nbsp;Go to the next part in the assembly and do the same thing. &amp;nbsp;Continue until all the parts are changed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can get this code to work for the first part, but then it errors out when it gets to the second part. &amp;nbsp;The "Lista" variable is the component browser name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am probably going about this all wrong. Any Suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kirk&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SyntaxEditor Code Snippet&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;oLength&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;InputBox&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Enter the length change (+ or -)in inches.&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;iLogic&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;0.25&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt;
&lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;comp&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; 
        &lt;SPAN&gt;Lista&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;""&lt;/SPAN&gt;
        &lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;AllLeafOccurrences&lt;/SPAN&gt;
            &lt;SPAN&gt;Lista&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;oOcc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Name&lt;/SPAN&gt;        
        &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Lista&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    
            &lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;comp&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oAsmDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;
        
            &lt;SPAN&gt;rowName&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;iPart&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;RowName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;comp&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Name&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
            &lt;SPAN&gt;RowValue&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;iPart&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;CurrentRowValue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Cutlength&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
            &lt;SPAN&gt;StockNoStringValue&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;iPart&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;CurrentRowStringValue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Stock Number&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
            &lt;SPAN&gt;NewLength&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;RowValue&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;oLength&lt;/SPAN&gt;
            &lt;SPAN&gt;MemberStringValue&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;StockNoStringValue&lt;/SPAN&gt; &lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt; &lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;NewLength&lt;/SPAN&gt;
            &lt;SPAN&gt;MsgBox&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;New Size==&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt; &lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;MemberStringValue&lt;/SPAN&gt; &lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt; Current RowName==&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt; &lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;rowname&lt;/SPAN&gt; &lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt; New Length ==&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;NewLength&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
            &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;MsgBox("Size==&amp;gt; " &amp;amp; MemberStringValue &amp;amp; " RowName==&amp;gt; " &amp;amp; iPart.RowName(comp.Name) &amp;amp; " New Length ==&amp;gt; "&amp;amp; NewLength)&lt;/SPAN&gt;
            &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;MemberStringValue = iPart.CurrentRowStringValue("Stock Number") &amp;amp; "-" &amp;amp; iPart.CurrentRowValue("Cutlength") + oLength&lt;/SPAN&gt;
            &lt;SPAN&gt;iPart.ChangeRow(Lista, MemberStringValue)&lt;/SPAN&gt;
            
            '&lt;SPAN&gt;iPart&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ChangeRow&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;iComponentName:1&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;RowMemberName&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
            
            &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;i = iPart.FindRow(comp.Name, "Member", "=", MemberStringValue) &lt;/SPAN&gt;
             &lt;SPAN&gt;Next&lt;/SPAN&gt;
            
    &lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; &lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
        &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Show&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Some problem occurred&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;iLogic&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    &lt;SPAN&gt;Else&lt;/SPAN&gt;
        &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;MessageBox.Show("iPart set to row: " &amp;amp; MemberStringValue , "Change ALL members iLogic")&lt;/SPAN&gt;
    &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 02:51:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6253567#M62926</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-04-06T02:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6264459#M63062</link>
      <description>&lt;P&gt;Hello Kirk,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure what is causing the error just looking at the code. Can you upload a small assembly that will allow me to recreate the error? If you want to keep it private you can send it to wayne.brill@autodesk.com&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>Mon, 11 Apr 2016 20:34:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6264459#M63062</guid>
      <dc:creator>wayne.brill</dc:creator>
      <dc:date>2016-04-11T20:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6264700#M63064</link>
      <description>&lt;P&gt;Wayne,&lt;/P&gt;
&lt;P&gt;I am sending you an email.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kirk&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2016 22:47:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6264700#M63064</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-04-11T22:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6266684#M63095</link>
      <description>&lt;P&gt;Hi Kirk,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for sending the assembly. Here is the iLogic rule that works for me. (no error about missing occurrence) Not exactly sure this is what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;oLength = InputBox("Enter the length change (+ or -)in inches.", "iLogic", "0.25")

Dim oAsmDoc as Inventor.AssemblyDocument
oAsmDoc = ThisDoc.Document

Dim comp As Inventor.ComponentOccurrence

		'Lista = ""
		
		For Each oOcc In ThisApplication.ActiveDocument.ComponentDefinition.Occurrences.AllLeafOccurrences
			'Lista=oOcc.Name
			'WB commented above, it helps me to have a variable name that indicates what the varible is
			occName = oOcc.Name
			
			'WB added - just wanted to see the names of the occurrences and exit
			'MsgBox("occName = " &amp;amp; occName)
		'Next
		'Return

	        'WB commented, not sure what this for loop was supposed to do
			'For Each comp In oAsmDoc.ComponentDefinition.Occurrences
		        'WB commented 
				'rowName = iPart.RowName(comp.Name)
				rowName = iPart.RowName(occName)
				RowValue = iPart.CurrentRowValue("Cutlength")
				StockNoStringValue = iPart.CurrentRowStringValue("Stock Number")
				NewLength = RowValue+oLength
				MemberStringValue = StockNoStringValue &amp;amp; "-" &amp;amp; NewLength

				'MsgBox("New Size==&amp;gt; " &amp;amp; MemberStringValue &amp;amp; " Current RowName==&amp;gt; " &amp;amp; rowname &amp;amp; " New Length ==&amp;gt; "&amp;amp; NewLength)
				'MsgBox("Size==&amp;gt; " &amp;amp; MemberStringValue &amp;amp; " RowName==&amp;gt; " &amp;amp; iPart.RowName(comp.Name) &amp;amp; " New Length ==&amp;gt; "&amp;amp; NewLength)

				MemberStringValue = iPart.CurrentRowStringValue("Stock Number") &amp;amp; "-" &amp;amp; iPart.CurrentRowValue("Cutlength") + oLength

				
				'iPart.ChangeRow(Lista, MemberStringValue)
				MsgBox("occName = " &amp;amp; occName &amp;amp; " Changing to " &amp;amp; MemberStringValue)
				iPart.ChangeRow(occName, MemberStringValue)
					
				
				'iPart.ChangeRow("iComponentName:1", "RowMemberName")
				
				'i = iPart.FindRow(comp.Name, "Member", "=", MemberStringValue) 
	 		Next
   			If i &amp;lt; 0 Then
       			MessageBox.Show("Some problem occurred", "iLogic")
    		Else
        		'MessageBox.Show("iPart set to row: " &amp;amp; MemberStringValue , "Change ALL members iLogic")
    		End If
	
		'WB commented
		'Next&lt;/PRE&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Wayne&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 18:56:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6266684#M63095</guid>
      <dc:creator>wayne.brill</dc:creator>
      <dc:date>2016-04-12T18:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6266866#M63102</link>
      <description>&lt;P&gt;Wayne,&lt;/P&gt;
&lt;P&gt;Many thinks.... That is slick. &amp;nbsp;It does exactly what I was trying to do. &amp;nbsp;The for/next loop that you commented on was used to gather the information about each part in the assembly. &amp;nbsp;It would then search the ipart table and add the increment to the member.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will try this later with the ipart member that is over 3,000 members long. &amp;nbsp;I think it will be faster..... will let you know how it goes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again,&lt;/P&gt;
&lt;P&gt;Kirk&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 20:13:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6266866#M63102</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-04-12T20:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6268040#M63128</link>
      <description>&lt;P&gt;Wayne,&lt;/P&gt;
&lt;P&gt;Normally when I am changing out these members, it will take about 45secs for the table to be displayed so I can select a different member. &amp;nbsp;I have to go thru each part and change them and it gets frustrating after awhile.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried this on my "working" ipart with over 3,000 rows in the table. &amp;nbsp;Attached&amp;nbsp;is a video of this code working. It actually takes less than 20 secs to change 4 members.&amp;nbsp;&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;Thanks again,&lt;/P&gt;
&lt;P&gt;Kirk&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:18:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6268040#M63128</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-04-13T12:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6268047#M63129</link>
      <description>&lt;P&gt;I can't see a video. Glad it's sorted for you!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:14:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6268047#M63129</guid>
      <dc:creator>Jef_E</dc:creator>
      <dc:date>2016-04-13T12:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a faster way?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6268067#M63130</link>
      <description>&lt;P&gt;I forgot to attach it, but I just edited my post. &amp;nbsp;See if its there now.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 12:22:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-faster-way/m-p/6268067#M63130</guid>
      <dc:creator>karthur1</dc:creator>
      <dc:date>2016-04-13T12:22:46Z</dc:date>
    </item>
  </channel>
</rss>

