Hard to explain this but I wil do my best.
Making a part that will have the size as an option to pick. Issue is Ilogic does not like it.
I have a list that has sizes like:
3" X 2"
4" X 2"
4" X 4"
But when I put in the code
If Plate_Size = "3" X 2"" Then Parameter("Dim_X") = 3 Parameter("Dim_Y") = 2 Parameter("Foot_Code") = "A" ElseIf Plate_Size = "4" X 2"" Then Parameter("Dim_X") = 4 Parameter("Dim_Y") = 2 Parameter("Foot_Code") = "B" End If
it gives me an error
Error on Line 4 : End of statement expected.
and highlight the If Plate_Size ="3" X 2"".
I know it has to do with the X but I an't remember what to do having brain fart.
Can someone refresh me.....
Solved! Go to Solution.
Solved by jdkriek. Go to Solution.
Solved by thomaskennedy. Go to Solution.
I think the " marks are messing you up. iLogic will see the string as divided because the " will be seen as the start and end of a string.
Yes you are correct. Is there a way to keep them? I know it has to do with a double something if I remember correctly..
Metric lol that would flip these rednecks out they don't even know what a weld symbol is LOL.
Yeah i was thinking the same thing about the new parameter I guess I will just take them out for now..
You should be able to put an 'extra' quotation mark in the string like this :
If Plate_Size = "3"" X 2""" Then Parameter("Dim_X") = 3 Parameter("Dim_Y") = 2 Parameter("Foot_Code") = "A" ElseIf Plate_Size = "4"" X 2""" Then Parameter("Dim_X") = 4 Parameter("Dim_Y") = 2 Parameter("Foot_Code") = "B" End If
(The extra quotation mark will be ignored when the rule is compiled and run)
Cheers,
Tom
Or you can use Chr(34) - less confusing programmatically IMO
If Plate_Size = "3" & Chr(34) & " X 2" & Chr(34) Then Parameter("Dim_X") = 3 Parameter("Dim_Y") = 2 Parameter("Foot_Code") = "A" ElseIf Plate_Size = "4" & Chr(34) & " X 2" & Chr(34) Then Parameter("Dim_X") = 4 Parameter("Dim_Y") = 2 Parameter("Foot_Code") = "B" End If