Skierarc
Mechanical
- Aug 10, 2009
- 2
Hey guys,
This is my first post here, but I've found other topics here very helpful.
So I have a very long IF statement that sorts a custom parameter 'stocksize'. I did this because I am making a gauge to measure arc length and I am going to have preset lengths engraved on the gauge that the guys in the shop can easily lock into position. At first I had 20 different lengths which were 20 IF statements in a line, but when I laid that out it wasn't going to be accurate enough for what we do. So I then went to 40 locations which had a 1/8" increment in arc length, but when I wrote that equation Soildworks crashes.
So here is my equation:
IF(`StockSize`<6.125;1;IF(`StockSize`<6.25;2;IF(`StockSize`
<6.375;3;IF(`StockSize`<6.5;4;IF(`StockSize`<6.625;5;IF(`Sto
ckSize`<6.75;6;IF(`StockSize`<6.875;7;IF(`StockSize`<7;8;IF
(`StockSize`<7.125;9;IF(`StockSize`<7.25;10;IF(`StockSize`
<7.375;11;IF(`StockSize`<7.5;12;IF(`StockSize`<7.625;13;IF
(`StockSize`<7.75;14;IF(`StockSize`<7.875;15;IF(`StockSize`
<8;16;IF(`StockSize`<8.125;17;IF(`StockSize`<8.25;18;IF(`Sto
ckSize`<8.375;19;IF(`StockSize`<8.5;20;IF(`StockSize`<8.625
;21;IF(`StockSize`<8.75;22;IF(`StockSize`<8.875;23;IF(`Stock
Size`<9;24;IF(`StockSize`<9.125;25;IF(`StockSize`<9.25;26;IF
(`StockSize`<9.375;27;IF(`StockSize`<9.5;28;IF(`StockSize`<9
.625;29;IF(`StockSize`<9.75;30;IF(`StockSize`<9.875;31;IF(
`StockSize`<10;32;IF(`StockSize`<10.125;33;IF(`StockSize`<10
.25;34;IF(`StockSize`<10.375;35;IF(`StockSize`<10.5;36;IF(`S
tockSize`<10.625;37;IF(`StockSize`<10.75;38;IF(`StockSize`<1
0.875;39;IF(`StockSize`<11;40;123456789)))))))))))))))))))))
)))))))))))))))))))
Don't worry I didn't write this by hand, I had excel create it for me. Its 969 characters long, which I think may be the problem. Is there a character limit on equations or is there a simpler way of doing this?
Also the equation is going into a BOM on a drawing sheet.
Thanks,
Josh
This is my first post here, but I've found other topics here very helpful.
So I have a very long IF statement that sorts a custom parameter 'stocksize'. I did this because I am making a gauge to measure arc length and I am going to have preset lengths engraved on the gauge that the guys in the shop can easily lock into position. At first I had 20 different lengths which were 20 IF statements in a line, but when I laid that out it wasn't going to be accurate enough for what we do. So I then went to 40 locations which had a 1/8" increment in arc length, but when I wrote that equation Soildworks crashes.
So here is my equation:
IF(`StockSize`<6.125;1;IF(`StockSize`<6.25;2;IF(`StockSize`
<6.375;3;IF(`StockSize`<6.5;4;IF(`StockSize`<6.625;5;IF(`Sto
ckSize`<6.75;6;IF(`StockSize`<6.875;7;IF(`StockSize`<7;8;IF
(`StockSize`<7.125;9;IF(`StockSize`<7.25;10;IF(`StockSize`
<7.375;11;IF(`StockSize`<7.5;12;IF(`StockSize`<7.625;13;IF
(`StockSize`<7.75;14;IF(`StockSize`<7.875;15;IF(`StockSize`
<8;16;IF(`StockSize`<8.125;17;IF(`StockSize`<8.25;18;IF(`Sto
ckSize`<8.375;19;IF(`StockSize`<8.5;20;IF(`StockSize`<8.625
;21;IF(`StockSize`<8.75;22;IF(`StockSize`<8.875;23;IF(`Stock
Size`<9;24;IF(`StockSize`<9.125;25;IF(`StockSize`<9.25;26;IF
(`StockSize`<9.375;27;IF(`StockSize`<9.5;28;IF(`StockSize`<9
.625;29;IF(`StockSize`<9.75;30;IF(`StockSize`<9.875;31;IF(
`StockSize`<10;32;IF(`StockSize`<10.125;33;IF(`StockSize`<10
.25;34;IF(`StockSize`<10.375;35;IF(`StockSize`<10.5;36;IF(`S
tockSize`<10.625;37;IF(`StockSize`<10.75;38;IF(`StockSize`<1
0.875;39;IF(`StockSize`<11;40;123456789)))))))))))))))))))))
)))))))))))))))))))
Don't worry I didn't write this by hand, I had excel create it for me. Its 969 characters long, which I think may be the problem. Is there a character limit on equations or is there a simpler way of doing this?
Also the equation is going into a BOM on a drawing sheet.
Thanks,
Josh