<?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 error help with syntax error in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-error-help-with-syntax-error/m-p/5970103#M113545</link>
    <description>&lt;P&gt;What you're trying to do can be done, but (at least in the context of iLogic) should be approached like -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Dim PC As String 
PC = "Apples Are Good"

Parameter.Param("N" + NUM1).Value = PC&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Just saying&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;"N" &amp;amp; NUM1 = PC&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Doesn't mean anything to the compiler. By just typing in a string (in this case "N"), you've given the compiler some sort of input that is not recognized as an instruction or a variable, so it gets cranky. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;---&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because I don't have any information on the bigger problem it would seem that you're trying to solve (with all of these parameters), I can only speculate, but most likely there is some room for other optimizations as this is a strange way one would update the value of a parameter. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would you be interested in going into more details about what it you're trying to accomplish? &lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 02 Jan 2016 03:41:42 GMT</pubDate>
    <dc:creator>MegaJerk</dc:creator>
    <dc:date>2016-01-02T03:41:42Z</dc:date>
    <item>
      <title>iLogic error help with syntax error</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-error-help-with-syntax-error/m-p/5968590#M113543</link>
      <description>&lt;P&gt;I have a line in my code that is&lt;/P&gt;&lt;P&gt;"N" &amp;amp; NUM1=PC&lt;/P&gt;&lt;P&gt;with this I get a syntax error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;N is just a letter&lt;/P&gt;&lt;P&gt;N1, N2, N3 thru N20 are&amp;nbsp;text parameters&amp;nbsp;&lt;/P&gt;&lt;P&gt;NUM1 is a text parameter that contains a multitext value of numbers (1-20)&lt;/P&gt;&lt;P&gt;PC is a line of text "Apples are good"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want it to do is pair the "N" with a selected number and put the line of text (PC) in the specified (N1, N2, N3, etc..) parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Such as if NUM1=1 and PC="Apples are good"&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;"N" &amp;amp; NUM1 = PC&lt;/P&gt;&lt;P&gt;Would be&amp;nbsp;&lt;/P&gt;&lt;P&gt;N1="Apples are good"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried testing the "N" &amp;amp; NUM1 to see if this does return N1 and it does if I go the opposite direction X="N" &amp;amp; NUM1 then it makes X=N1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What other way can I right the "N" &amp;amp; NUM1 to get the correct result, and not get a syntax error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 18:27:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-error-help-with-syntax-error/m-p/5968590#M113543</guid>
      <dc:creator>DJFore</dc:creator>
      <dc:date>2015-12-30T18:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic error help with syntax error</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-error-help-with-syntax-error/m-p/5969558#M113544</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN class=""&gt;&lt;A id="link_3d03988bdd7140" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/428645" target="_self"&gt;djf&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I will move this post into the customization forum where it is beeter served there.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Don&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2015 19:23:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-error-help-with-syntax-error/m-p/5969558#M113544</guid>
      <dc:creator>ADSKDJW4</dc:creator>
      <dc:date>2015-12-31T19:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic error help with syntax error</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-error-help-with-syntax-error/m-p/5970103#M113545</link>
      <description>&lt;P&gt;What you're trying to do can be done, but (at least in the context of iLogic) should be approached like -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Dim PC As String 
PC = "Apples Are Good"

Parameter.Param("N" + NUM1).Value = PC&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Just saying&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;"N" &amp;amp; NUM1 = PC&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Doesn't mean anything to the compiler. By just typing in a string (in this case "N"), you've given the compiler some sort of input that is not recognized as an instruction or a variable, so it gets cranky. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;---&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because I don't have any information on the bigger problem it would seem that you're trying to solve (with all of these parameters), I can only speculate, but most likely there is some room for other optimizations as this is a strange way one would update the value of a parameter. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would you be interested in going into more details about what it you're trying to accomplish? &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jan 2016 03:41:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-error-help-with-syntax-error/m-p/5970103#M113545</guid>
      <dc:creator>MegaJerk</dc:creator>
      <dc:date>2016-01-02T03:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic error help with syntax error</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-error-help-with-syntax-error/m-p/5973935#M113546</link>
      <description>&lt;P&gt;What I am building is a notes configurator for our company this is the form shown below (all things in red are the parameters) Basically&amp;nbsp;my user&amp;nbsp;fills out the Prod Contact/Non-Prod Contact etc.. then select a number to the right that places it in a numbered order on the drawing. 1 = Note #1, 2 = Note #2, 0= Turns off that note.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/209633iA1E02FEFEBAB0D94/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Form.JPG" title="Form.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;So I got the rule to work if I write it out in what I consider long form but I was looking for a way to make it much more compact. This is the two sections of code I have for PC and NPC shown below. This works but is very long expecially since I have 20 fields. PC=field #1, NPC= field #2, etc....&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;So I noticed a pattern see below if the NUM1="1" then N1 =PC well if its going to be "N" and the matching NUM# then why just not say "N"+NUM#= N# hence the question. I started with.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'PREDEFINED NOTES
'[
PC = "ALL PRODUCT CONTACT MATERIAL WILL BE " &amp;amp; NOTES_PC &amp;amp; "."
NPC = "ALL NON-PRODUCT CONTACT MATERIAL WILL BE " &amp;amp; NOTES_NON_PC &amp;amp; "."
PCF = "ALL PRODUCT CONTACT MATERIAL WILL HAVE A " &amp;amp; NOTES_PC_FINISH &amp;amp; " MAX FINISH."
NPCF = "ALL NON-PRODUCT CONTACT MATERIAL WILL HAVE A " &amp;amp; NOTES_NONPC_FINISH &amp;amp; " MAX FINISH."
STW = "SANITARY TUBING WELDS - " &amp;amp; STW_ID &amp;amp; " ID AND " &amp;amp; STW_OD &amp;amp; " OD, " &amp;amp; STW_LOC &amp;amp; "."
']


'Puts #1 Line in any of the 20 fields
'[
If NUM1 = "1" Then
N1 = PC 
ElseIf NUM1= "2" Then
N2 = PC
ElseIf NUM1= "3" Then
N3 = PC
ElseIf NUM1= "4" Then
N4 = PC
ElseIf NUM1= "5" Then
N5 = PC
ElseIf NUM1= "6" Then
N6 = PC
ElseIf NUM1= "7" Then
N7 = PC
ElseIf NUM1= "8" Then
N8 = PC
ElseIf NUM1= "9" Then
N9 = PC
ElseIf NUM1= "10" Then
N10 = PC
ElseIf NUM1= "11" Then
N11 = PC
ElseIf NUM1= "12" Then
N12 = PC
ElseIf NUM1= "13" Then
N13 = PC
ElseIf NUM1= "14" Then
N14 = PC
ElseIf NUM1= "15" Then
N15 = PC
ElseIf NUM1= "16" Then
N16 = PC
ElseIf NUM1= "17" Then
N17 = PC
ElseIf NUM1= "18" Then
N18 = PC
ElseIf NUM1= "19" Then
N19 = PC
ElseIf NUM1= "20" Then
N20 = PC
End If
']

'Puts #2 Line in any of the 20 fields
'[
If NUM2 = "1" Then
N1 = NPC 
ElseIf NUM2= "2" Then
N2 = NPC
ElseIf NUM2= "3" Then
N3 = NPC
ElseIf NUM2= "4" Then
N4 = NPC
ElseIf NUM2= "5" Then
N5 = NPC
ElseIf NUM2= "6" Then
N6 = NPC
ElseIf NUM2= "7" Then
N7 = NPC
ElseIf NUM2= "8" Then
N8 = NPC
ElseIf NUM2= "9" Then
N9 = NPC
ElseIf NUM2= "10" Then
N10 = NPC
ElseIf NUM2= "11" Then
N11 = NPC
ElseIf NUM2= "12" Then
N12 = NPC
ElseIf NUM2= "13" Then
N13 = NPC
ElseIf NUM2= "14" Then
N14 = NPC
ElseIf NUM2= "15" Then
N15 = NPC
ElseIf NUM2= "16" Then
N16 = NPC
ElseIf NUM2= "17" Then
N17 = NPC
ElseIf NUM2= "18" Then
N18 = NPC
ElseIf NUM2= "19" Then
N19 = NPC
ElseIf NUM2= "20" Then
N20 = NPC
End If
']&lt;/PRE&gt;&lt;P&gt;Now I plugged in the expanded version of the answer I recieved see below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim PC As String
Dim NPC As String
Dim PCF As String
Dim NPCF As String
Dim STW As String
PC = "ALL PRODUCT CONTACT MATERIAL WILL BE " &amp;amp; NOTES_PC &amp;amp; "."
NPC = "ALL NON-PRODUCT CONTACT MATERIAL WILL BE " &amp;amp; NOTES_NON_PC &amp;amp; "."
PCF = "ALL PRODUCT CONTACT MATERIAL WILL HAVE A " &amp;amp; NOTES_PC_FINISH &amp;amp; " MAX FINISH."
NPCF = "ALL NON-PRODUCT CONTACT MATERIAL WILL HAVE A " &amp;amp; NOTES_NONPC_FINISH &amp;amp; " MAX FINISH."
STW = "SANITARY TUBING WELDS - " &amp;amp; STW_ID &amp;amp; " ID AND " &amp;amp; STW_OD &amp;amp; " OD, " &amp;amp; STW_LOC &amp;amp; "."

Parameter.Param("N"+NUM1).Value=PC
Parameter.Param("N"+NUM2).Value=NPC
Parameter.Param("N"+NUM3).Value=PCF
Parameter.Param("N"+NUM4).Value=NPCF
Parameter.Param("N"+NUM5).Value=STW&lt;/PRE&gt;&lt;P&gt;But It doesnt seem to be working correctly it seems to be randomly&amp;nbsp;turning the notes on and off when I chose the placement number.&lt;/P&gt;&lt;P&gt;I do have something that works but I thought I might be able to simplify it. If so great, if not thats ok too.&lt;/P&gt;&lt;P&gt;Thanks,&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, 05 Jan 2016 15:28:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-error-help-with-syntax-error/m-p/5973935#M113546</guid>
      <dc:creator>DJFore</dc:creator>
      <dc:date>2016-01-05T15:28:14Z</dc:date>
    </item>
  </channel>
</rss>

