<?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: Index a Parameter Name during Assignment - Ilogic in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5910530#M353158</link>
    <description>&lt;P&gt;You may get a better results by posting this question in the Inventor Customization forum: &lt;A href="http://forums.autodesk.com/t5/inventor-customization/bd-p/120&amp;nbsp;" target="_blank"&gt;http://forums.autodesk.com/t5/inventor-customization/bd-p/120&amp;nbsp;&lt;/A&gt; Also always indicate which version of Inventor you are using.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Nov 2015 19:58:14 GMT</pubDate>
    <dc:creator>Mark.Lancaster</dc:creator>
    <dc:date>2015-11-16T19:58:14Z</dc:date>
    <item>
      <title>Index a Parameter Name during Assignment - Ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5910435#M353157</link>
      <description>&lt;P&gt;Hello Inventor Forum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a question about Inventor Ilogic. I have an assembly with 5 parts that are all the same except for a difference in height. The part names are "Part: 1", "Part: 2", Part: 3" etc. &amp;nbsp;The height parameters are "PartHeight1", "PartHeight2", "PartHeight3" etc. I also have a parameter "NumberOfParts" which dictates how many of the parts are present in the assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to write a for loop such that:&lt;/P&gt;&lt;P&gt;for i in range(0, NumberOfParts):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PartHeight[i] = InputBox("What is the Height of Part" + str(i), "Part Height")&lt;/P&gt;&lt;P&gt;end for loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could also do the same thing with a while loop:&lt;/P&gt;&lt;P&gt;i = 0&lt;/P&gt;&lt;P&gt;while i&amp;lt;NumberOfParts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=i+1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PartHeight[i] = InputBox("What is the Height of Part" + str(i), "Part Height")&lt;/P&gt;&lt;P&gt;end While&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is: How do I index the parameter name "PartHeight1", "PartHeight2", "PartHeight3" etc. during the loop? It throws a syntax error if I do something like ("PartHeight"+str(i)) = InputBox(....). Is there a way to index through the names?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would rather not hard code in the numbers, because the number of parts in the assembly can increase beyond the point of convenient hard coding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Nicholas&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 19:05:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5910435#M353157</guid>
      <dc:creator>Nickefth61</dc:creator>
      <dc:date>2015-11-16T19:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Index a Parameter Name during Assignment - Ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5910530#M353158</link>
      <description>&lt;P&gt;You may get a better results by posting this question in the Inventor Customization forum: &lt;A href="http://forums.autodesk.com/t5/inventor-customization/bd-p/120&amp;nbsp;" target="_blank"&gt;http://forums.autodesk.com/t5/inventor-customization/bd-p/120&amp;nbsp;&lt;/A&gt; Also always indicate which version of Inventor you are using.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 19:58:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5910530#M353158</guid>
      <dc:creator>Mark.Lancaster</dc:creator>
      <dc:date>2015-11-16T19:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Index a Parameter Name during Assignment - Ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5911607#M353159</link>
      <description>&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will move the posting. Would you say that the customization page is the best place of all iLogic questions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm also adding a tag with my Inventor Version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nicholas&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 12:24:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5911607#M353159</guid>
      <dc:creator>Nickefth61</dc:creator>
      <dc:date>2015-11-17T12:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Index a Parameter Name during Assignment - Ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5911625#M353160</link>
      <description>&lt;P&gt;iLogic posting can happen here and they do.&amp;nbsp; Should yours be posted here?&amp;nbsp; It can, but you may not get any response because you are writing VB/.NET stuff into your iLogic code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many users here may use iLogic but they are only using the iLogic functions and may not have any true programming experience.&amp;nbsp;&amp;nbsp; Where-as the customization forum is probably monitored by those who do have an extensive programming background or experience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In addition (and this is my opinion)...&amp;nbsp; I don't considered your code as being iLogic, its VB or .NET.&amp;nbsp;&amp;nbsp; When I think of someone saying I have a iLogic code, I see their entire code written using only the iLogic functions.&amp;nbsp; But that's my 2 cents...&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 12:41:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5911625#M353160</guid>
      <dc:creator>Mark.Lancaster</dc:creator>
      <dc:date>2015-11-17T12:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Index a Parameter Name during Assignment - Ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5945678#M353161</link>
      <description>&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for sharing your opinion. I suppose you would be correct in saying that is not true Ilogic snippet code. I tried moving this post and couldn't find the option to do so. Truth be told, I had trouble navigating back to the post after posting it...couldn't find it! Then I remembered the option to see all activity in my account page, and here I am.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ended up finding the solution to my problem anyway. I'll post it here in case anyone else happens to come upon this post...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To index a parameter, I cannot use the str() code because when it converts my integer to a string, it adds a space. Ilogic has a snippet, Cstr() which converts to a string without the space. With a parameter it would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i = 0&lt;/P&gt;&lt;P&gt;while i&amp;lt;NumberOfParts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=i+1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Parameter("PartHeight"+Cstr(i)) = InputBox("What is the Height of Part" + Cstr(i), "Part Height")&lt;/P&gt;&lt;P&gt;end While&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "Parameter" data type can be used not only when assigning parameter names, but when calling them. So if you need to ever index or alter a parameter name, call it, or do anything of that nature, Parameter() can help. I hadn't realized in my lack of experience that Parameter() is actually an Ilogic datatype.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, thank you Mark for your reply. I hope this helps anyone else having a similar issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nicholas&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2015 14:56:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/index-a-parameter-name-during-assignment-ilogic/m-p/5945678#M353161</guid>
      <dc:creator>Nickefth61</dc:creator>
      <dc:date>2015-12-10T14:56:59Z</dc:date>
    </item>
  </channel>
</rss>

