oil units id schema

oil units id schema - units schema xml - Сообщения

#1 Опубликовано: 22.03.2019 00:54:47
gurney

gurney

0 сообщений из 4 понравились пользователям.

Группа: User

I want to add custom units to the .xml file, but I can't find the schema that explains to me what the id="#" # references to.
I want to add custom units, in this case US Oil Barrels (volume).

















#2 Опубликовано: 02.03.2023 15:20:01
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

74 сообщений из 164 понравились пользователям.

Группа: User

Greetings,

Through Successive Iterations, I was able to determine the following:

o The 「id」 field correlates to the Language file; id=”635” is the 635th entry, which is the word: ‘per mille’ ( 「C:\Program Files (x86)\SMath Studio\lang\Text_ENG.lang」 )

Показать спойлер



With that being said, I am unaware of how to 'add' or 'redefine' a given Entry within the Text_ENG.lang file; you can find the word/phrase that best matches your custom unit, just be advised that you cannot define more than (1) unit the same id (SMath will not even attempt to open unless you have a valid Units.xml file (i.e., if you define an ID to a Unit and SMath opens: you configured it correctly!)).

Please note: you do not need to define an 「id」 field; the 「title」 field can be used instead (See below for title/lang syntax as an alternative to id):
<add factor="9.80665" exp="-3" system="All" title="Gram-force" lang:rus="Грамм-сила">
   <synonym name="gf" lang:rus="гс" />
</add>

Therefore, your 'new unit' can be inserted as follows:
<add factor="6.28981" system="Metric" title="US Oil Barrels">
   <synonym name="bbl" />
</add>

May this be of help to the next person;
-Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
1 пользователям понравился этот пост
Mark R Harris 03.03.2023 02:07:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений