It's possible to block the negative input in field's?

It's possible to block the negative input in field's? - Mensajes

#1 Publicado: 12/9/2022 15:33:22
Hildebrando Pereira dos Santos Junior

Hildebrando Pereira dos Santos Junior

2 me gusta en 21 mensajes.

Grupo: User

Hey Guys,

It's possible to block the negative input in field's using smath viewer?
#2 Publicado: 14/9/2022 9:40:10
Davide Carpi

Davide Carpi

1.443 me gusta en 2.936 mensajes.

Grupo: Moderator

Nope, the best way to accomplish it easily is to filter the output applying abs() to the value before using it.

a:1

a:abs(a)

f(a): ...
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Publicado: 14/9/2022 9:47:52
Hildebrando Pereira dos Santos Junior

Hildebrando Pereira dos Santos Junior

2 me gusta en 21 mensajes.

Grupo: User

Thanks Davide! Actually i do this, i will use an formatted label to show some message warning the user
#4 Publicado: 14/9/2022 10:51:57
Davide Carpi

Davide Carpi

1.443 me gusta en 2.936 mensajes.

Grupo: Moderator

You are welcome. As alternative one can develop a region that translates into a TextBox control with mask/validation filters. It might be tricky depending on the filter but it is feasible.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#5 Publicado: 14/9/2022 11:04:57
Hildebrando Pereira dos Santos Junior

Hildebrando Pereira dos Santos Junior

2 me gusta en 21 mensajes.

Grupo: User

Wow! It will be a great plugin! It can be extend the use of smath viewer in so many ways
#6 Publicado: 14/9/2022 15:53:11
Hildebrando Pereira dos Santos Junior

Hildebrando Pereira dos Santos Junior

2 me gusta en 21 mensajes.

Grupo: User

Wrote

Wrote

It's possible to block the negative input in field's using smath viewer ?


Pretty simple to zap negative values:
1. transform negatives to '0'
2. strip vector from '0'
No need using Smath Viewer.
Cheers ... Jean.

Random [rnd(n)] Filter.sm (10,03 KiB) descargado 1037 vez(es).

Composite clean negatives.

CleanNegative.PNG



Thanks Jean, but it's not the case.

I have an long application developed in Smath Studio using Smath Viewer, and some of my algorithms need's a positive input for bending moment's. For now showing a warning message, and using an absolute value work, it's not the more elegant solution, but work.


#7 Publicado: 14/9/2022 16:41:46
Hildebrando Pereira dos Santos Junior

Hildebrando Pereira dos Santos Junior

2 me gusta en 21 mensajes.

Grupo: User

Wrote

Wrote

I have an long application developed in Smath Studio ... , and some of my algorithms need a positive input for bending moment's.


The very original document at the algorithms level might help.
Not my discipline, but curious.
Refreshed version of the previous Filter Negatives.
Jean.

Random [rnd(n)] Filter.sm (10,07 KiB) descargado 1031 vez(es).



Sure! The document is here:

DIMIS_219.sm (838,58 KiB) descargado 1251 vez(es).

The section is called "Flexão Composta" the value of Msd, for this algorithm need's to be positive.
#8 Publicado: 14/9/2022 16:44:08
overlord

overlord

600 me gusta en 1.381 mensajes.

Grupo: Moderator

Wrote

Thanks Jean, but it's not the case.


Get use to what he do, but never bow down or surrender.

He will try to hijack your topics with totally unrelated replies.
Just report his irrelevant posts, mods will take care it eventually.

Regards
  • Nuevos mensajes
  • Sin mensajes nuevos