Snippet Operations with units Fail

Snippet Operations with units Fail - Fails on some occasions to detect the units - Messages

#1 Posted: 5/16/2022 7:05:41 PM
CBG

CBG

77 likes in 312 posts.

Group: User

Hello


The unit operation snippet fails to detect units.

Snippet_Units_Fail.png

Snippet_Units_Fail.sm (33 KiB) downloaded 61 time(s).

Best Regards

Carlos
#2 Posted: 5/17/2022 9:02:34 AM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Try this

Snippet_Units_Fail.sm (32 KiB) downloaded 55 time(s).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 5/17/2022 9:12:04 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

The unit operation snippet fails to detect units.


Hola Carlos ... Jean...OK SS 6179

UoM.PNG


#4 Posted: 5/17/2022 4:51:34 PM
CBG

CBG

77 likes in 312 posts.

Group: User

Hello David

Quote

Try this




Thank you very much for your answer, but the snippet fails, since instead
of finding the units, it only obtains the value of 1

Snippet_Units_Fail_2.png

Hola Jean

Saludos

Best Regards

Carlos
#5 Posted: 5/18/2022 4:44:35 AM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Wrote

Hello David


Thank you very much for your answer, but the snippet fails, since instead
of finding the units, it only obtains the value of 1



My bad, IDK why but yesterday seemed to work to me, but in fact it doesn't. I'll give another look at the snippet ASAP.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#6 Posted: 5/18/2022 2:00:44 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

I see the issue. The function look for a numerator/denominator pattern in the num2str() text, but doesn't handle cases in which multiple divisions are involved.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#7 Posted: 5/18/2022 10:47:59 PM
CBG

CBG

77 likes in 312 posts.

Group: User

Hello David

Thank you very much for your attention, I hope the Snippet has a fix-

On the other hand, I ran the snippet in version 6179,
and it works perfectly. How is that possible?

Snippet_Units_6179.png

Best Regards

Carlos
#8 Posted: 5/19/2022 8:28:50 AM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

I'm not sure, however if you need a urgent fix here you have an easy way to make it working the same way.

2022-05-19 13_24_54-SMath Studio 0.98.6179 - [Documento1_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • New Posts New Posts
  • No New Posts No New Posts