[SS-2300] If Statement Problem: booleans equal vs (imperial) units

[SS-2300] If Statement Problem: booleans equal vs (imperial) units - If Statement Problem - 消息

#1 已发布: 2016/7/12 19:19:43
uncblue

uncblue

2个赞,共18个帖子。

组: User

Hi All,

I'm trying to write an if statement that determines capacities based on certain inputs.
I've attached the sheet in question.
I'm not sure if it's something on my end, but for certain fractions/values the if statement will not produce the correct value.

For instance, if my tpan value is set to 3/8 inch, it will work correctly.



But if I set it to 1/4 inch, it will not work correctly.




test.sm (8.15 KiB)已下载 1367 次。
#2 已发布: 2016/7/12 20:40:05
Ernesto

Ernesto

13个赞,共74个帖子。

组: User

Sometimes using units have issues. In this case, if you right click the "vw" equation, and choose fractions menu and choose fractions, it will work.
2位用户喜欢此帖子
uncblue 2016/7/13 10:10:00, Davide Carpi 2016/7/14 14:34:00
#3 已发布: 2016/7/13 03:26:15
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

I think it is related to SS-2300 (booleans vs imperial units)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1位用户喜欢此帖子
uncblue 2016/7/13 10:20:00
#4 已发布: 2016/7/13 09:21:14
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

But if I set it to 1/4 inch, it will not work correctly.



Yes it does work correctly: it does reply the otherwise specified for any non 3/8.

Forum LOGIC.sm (10.25 KiB)已下载 1331 次。

Forum Logic OK.gif

1位用户喜欢此帖子
uncblue 2016/7/13 10:19:00
#5 已发布: 2016/7/13 10:19:16
uncblue

uncblue

2个赞,共18个帖子。

组: User

@Ernesto, Thanks, this seems to be working.

@Davide Carpi, Yes I tested this and noticed there was no issue with Metric units. Sorry, I didn't find the bug when I searched.

@Jean Giraud, I guess I didn't explain it very well. I meant that if I change the input variable tpan = 1/4 in and also change the boolean to determine if tpan = 1/4 in, the evaluation will not return the correct output of 730 lbf/ft. See the bug report Davide linked for a better explanation.
#6 已发布: 2016/7/13 12:21:12
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

don't worry
thank you for posting a complete bug report (description, screenshot and a file to test the bug). Good to know that there is a workaround, however I hope Andrey will fix it soon (BTW if you register in the BTS you can vote the bug to prioritize the solution)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1位用户喜欢此帖子
uncblue 2016/7/14 16:44:00
#7 已发布: 2016/7/13 12:24:54
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

@Jean Giraud, I guess I didn't explain it very well. I meant that if I change the input variable tpan = 1/4 in and also change the boolean to determine if tpan = 1/4 in, the evaluation will not return the correct output of 730 lbf/ft.



Your original specification is for returning 730 lbf/ft for 3/8. If you change for 1/4,
how and why should it return 730 lbf/ft ? Smaller size has lower shear capacity.
If it wouldn't be so: hair size would also be 730 lbf/ft. Your system is underdesigned
for end purpose, that's my conclusion. Your unspecified 1/4 returns meaningless 1 lbf/ft.

If you don't have same as me: it's a version problem


Logic Shear.gif
#8 已发布: 2016/7/13 13:09:30
uncblue

uncblue

2个赞,共18个帖子。

组: User

Wrote

Wrote

@Jean Giraud, I guess I didn't explain it very well. I meant that if I change the input variable tpan = 1/4 in and also change the boolean to determine if tpan = 1/4 in, the evaluation will not return the correct output of 730 lbf/ft.



Your original specification is for returning 730 lbf/ft for 3/8. If you change for 1/4,
how and why should it return 730 lbf/ft ? Smaller size has lower shear capacity.
If it wouldn't be so: hair size would also be 730 lbf/ft. Your system is underdesigned
for end purpose, that's my conclusion. Your unspecified 1/4 returns meaningless 1 lbf/ft.

If you don't have same as me: it's a version problem


Logic Shear.gif



The strength values are irrelevant to the issue at hand which is the bug with input imperial units. I was trying to show the discrepancy for certain thickness input values and used the same shear strength output to explain. The reason why your if statement works is because you have removed the imperial unit issue as already mentioned. See attached screenshot and sheet.

test-2016-07-13.sm (9.43 KiB)已下载 1319 次。
#9 已发布: 2016/7/14 13:30:52
CBG

CBG

78个赞,共312个帖子。

组: User

It's work OK.


PanelType.png


Best Regards.

Carlos


test_CBG.sm (8.2 KiB)已下载 1333 次。
  • 有新帖
  • 无新帖