I wonder if someone could help me with this. There are many similar topics up here and I am encountering with this too, I can’t figure out where I might go wrong.
I use a simple If/ElseIf code to suppress/unsuppress & reposition holes on a plate to ensure the desired number of fixing hole pairs.
The hole positions will change and suppress/unsuppress depending on the value of the Tie Rod Pitch (vertical) and the O/A length of this plate (and pressure inside the radiator but this is sorted in Excel).
For example PitchMax = 500mm, BP_2ndS= 1600mm (plate length)
If (3 * TieRodPitch_MAX_2ndS ) < BP_2ndS < (4 * TieRodPitch_MAX_2ndS) Then
For some reason some times the parameters don’t update in the hole and pattern features after running the rule thus they are in the wrong position or not suppressed/unsuppressed. When I rearrange the If/ElseIf codes it may work. All I change is just replace ElseIfs with If-End Ifs or the other way around...
Which does not make any sense to me, since I change nothing in the parameters or conditions...
Is this code structured poorly? Or what else might be wrong?
Thanks in advance.
p.s. this is an engine radiator and the number of tie rod pairs depend on the height of the block, pressure inside, width, etc.
The part fie has the code.
It works fine for me. Could you post the Excel file so I can test it for the update problems you reported?
I don't like the way you formated the code, but I don't see why it wouldn't work.