Choosing units in SMath Viewer.

Choosing units in SMath Viewer. - Сообщения

#1 Опубликовано: 01.09.2025 08:54:25
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 052 сообщений из 1 718 понравились пользователям.

Группа: User

I post here because I can't find a page for the SMath Viewer Plugin.

How to extend the way for Choosing units in SMath Viewer?. For example, I want to enable to choose the output of a power in hp, kW, kJ/min, BTU/hr or the input for a volumetric flux in m^3/hr, LPM, GPM, etc.

Thanks in advance.
Alvaro.
Отредактировано 01.09.2025 10:03:49
#2 Опубликовано: 04.09.2025 14:10:14
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 052 сообщений из 1 718 понравились пользователям.

Группа: User

Hi. This is my approach, but I'm not entirely convinced, I have the feeling that there must be a better solution.

image.png

CalcPot.sm (146,06 КиБ) скачан 77 раз(а).

CalcPot.exe (3,77 МиБ) скачан 22 раз(а).

Best regards.
Alvaro.
1 пользователям понравился этот пост
Oscar Campo 04.09.2025 15:01:56
#3 Опубликовано: 05.09.2025 10:26:13
Martin Kraska

Martin Kraska

1 277 сообщений из 2 201 понравились пользователям.

Группа: Moderator

You can mess with the file Units.xml in the entries directory of your installation directory.

You can extend or reduce the units assigned to a particular dimension. Note that it seems not possible to distinguish physically different dimensions with the same base unit representation (just like energy and torque). But that is subject to testing.

So a new unit Nm will be displayed in the dynamic assistant with the annotation "Energy".

image.png

image.png
Martin KraskaPre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Alvaro Diaz Falconi 05.09.2025 18:51:39
#4 Опубликовано: 05.09.2025 19:03:56
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 052 сообщений из 1 718 понравились пользователям.

Группа: User

Hi Martin. Yo're right! Thanks! I'm not a fan of editing those files for two reasons. First, it's local; if I want someone else to have access to those changes, I have to ask them to make them too. And second, because every update deletes those changes.

However, I hadn't realized this is completely different here, since whoever I share the executable with doesn't even have to have SMath installed. I'm going to try editing that file in an installation of your portable version. In addition to removing several units that wouldn't be useful, such as nanopascals, I could introduce others such as meters or inches of water column for pressure, cubic meters for volume, GPM, LPM for flow rates, BTU/min for power, and many others.

Best regards.
Alvaro
  • Новые сообщения
  • Нет новых сообщений