Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline CBG  
#1 Posted : 17 May 2022 01:05:41(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Hello


The unit operation snippet fails to detect units.

Snippet_Units_Fail.png

Snippet_Units_Fail.sm (34kb) downloaded 18 time(s).

Best Regards

Carlos
Offline Davide Carpi  
#2 Posted : 17 May 2022 15:02:34(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,690
Man
Italy
Location: Italy

Was thanked: 1368 time(s) in 895 post(s)
Try this

Snippet_Units_Fail.sm (33kb) downloaded 16 time(s).
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Jean Giraud  
#3 Posted : 17 May 2022 15:12:04(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 983 time(s) in 811 post(s)
Originally Posted by: CBG Go to Quoted Post
The unit operation snippet fails to detect units.

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

UoM.PNG


Offline CBG  
#4 Posted : 17 May 2022 22:51:34(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
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
Offline Davide Carpi  
#5 Posted : 18 May 2022 10:44:35(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,690
Man
Italy
Location: Italy

Was thanked: 1368 time(s) in 895 post(s)
Originally Posted by: CBG Go to Quoted Post
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 consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Davide Carpi  
#6 Posted : 18 May 2022 20:00:44(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,690
Man
Italy
Location: Italy

Was thanked: 1368 time(s) in 895 post(s)
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.

Edited by user 18 May 2022 20:18:43(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline CBG  
#7 Posted : 19 May 2022 04:47:59(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
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
Offline Davide Carpi  
#8 Posted : 19 May 2022 14:28:50(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,690
Man
Italy
Location: Italy

Was thanked: 1368 time(s) in 895 post(s)
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

Edited by user 19 May 2022 20:29:37(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.