I'm trying to solve the iLogic code, but I knew not where I am going wrong.
Need to vary the dimensions in red.
The diameters are the same, however there is just a part code.
What should I do to vary the size in diameter?
If someone can help me.
Iva
Well you seem to have a few problems. Let’s start by looking at your multivalue list. You’ll notice that one of the values is listed as “1 in”, which is the standard way that Inventor would represent a number, however, because you’ve checked the “Allow Custom Values” box, the rest of those entries are actually strings of characters (just like this sentence, meaning that they are NOT interpreted as numbers).
As for your Select Case statement, I’m not really sure what you’re trying to do there in the slightest, but I’m willing to take a bet that you’d like to select a hole size (diameter) from that multivalue list, and have a certain action applied based on that selection. Does this sound right?
If so, my suggestion would be to alter your Multivalue list to either contain all numbers (so instead of having 3/8” use .375 instead), or all text value (instead of - 1 in use 1 Inch – to match the formatting of the other entries. It should also be noted that by using the quotation mark in your list, you make it a little more difficult to code for your values, as the quotation mark is used to denote the beginning and end of a string of text inside of nearly any programming language. Instead why not try something like – 1 Inch , 3/8 Inch , 1/2 Inch). From there you should be able to write a more cohesive Select Case statement.
If your multivalue gets changed to all numbers then the way you have it set up now would work, though you will need to change the values behind each case. I do not see any values that would equal 25.4.
If you change your multivalue to all text, then you would need to change your Select Case statement to look like the following example
Select Case YourParameterHere Case “1 Inch” Case “3/8 Inch” Case “1/2 Inch” End Select