oil units id schema

oil units id schema - units schema xml - Messages

#1 Posted: 3/22/2019 12:54:47 AM
gurney

gurney

0 likes in 4 posts.

Group: 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 Posted: 3/2/2023 3:20:01 PM
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

74 likes in 164 posts.

Group: 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」 )

Show Spoiler



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 users liked this post
Mark R Harris 3/3/2023 2:07:00 AM
  • New Posts New Posts
  • No New Posts No New Posts