Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
I have a number of tubes(part) with varying wall thicknesses of which I would like the colour of the tubes to change based on the thickness(perimeter), so the range of wall thicknesses and colours are as follows :
3.5-6.4mm should be red,
6.5-9.4mm should be yellow,
9.5-12.5mm should be Green and finally any wall thickness less than 3.5 should be grey in colour.
With the help of google I managed to find a solution and tweaked it a bit to suit my situation.
In my head it all makes sense but unfortunately Inventor disagrees, it returns with a massive syntax error!
I have pasted the error and the rule below.
Please kindly assist me.
If WALL_THICKNESS >= 9.5 Then Feature.Color("Tube A") = "RED" And If WALL_THICKNESS <= 12.5 Then Feature.Color("Tube A") = "RED" End If If WALL_THICKNESS >= 6.5 Then Feature.Color("Tube A") = "YELLOW" And If WALL_THICKNESS <= 9.4 Then Feature.Color("Tube A") = "YELLOW" End If If WALL_THICKNESS >= 3.5 Then Feature.Color("Tube A") = "GREEN" And If WALL_THICKNESS <= 6.4 Then Feature.Color("Tube A") = "GREEN" End If If WALL_THICKNESS < 3.5 Then Feature.Color("Tube A") = "GREY" End If
Solved! Go to Solution.