Yes (yet?) another IIF question...

I have a set of Equations happening on a Bearing Rail, everything is going well. Change the length, and the number of mounting hole Instances update accordingly. The Offset from the end is determined by the overall length / hole pitch. (60.0mm Hole Pitch.)

The Linear Pattern explodes on me though if an OAL value is entered that is divisable by sixty without a remainder.

"A"=  INT("OAL@PROFILE RAIL"/60) (=# of 60mm Pitches, A+1 = Number of Instances)

"B" is the Remainder. If "B" is less than 8.5, the afore mentioned Explosion occurs.

"C" is an adder.

"NUMBER OF HOLES@LPattern1"  =   "A"  + "1"

"NUMBER OF HOLES@LPattern1"  =   "A"  + "C"

If "B" is Less Than 8.5 "C" should be set to 0, if 8.5 or Greater "C" should be set to 1.

(IIF "B" < 8.5,"C"=0,"C"=1)

Above is the Equation I came up with.

1.) Can I do this with the IIF statement?

2.) What is right or what am I doing wrong.

Before post hogs swarm and tell me to search or give countless references I've already looked at, yes, I already have, thank you very much, don't bother.

Those with concrete examples or suggestions, Thank You.

Regards,

Alan

SolidworksConfigurations design Tables