Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline kompre  
#1 Posted : 31 August 2021 17:56:48(UTC)
kompre


Rank: Member

Groups: Registered
Joined: 05/08/2021(UTC)
Posts: 22
Italy

Hi,

I'm using smath studio for civil engineering purpose, so I would like like my results to be expressed in a few preferred unit types common in my field.

For example a Force is usually expressed in Newton (N) by SS, but I would prefer it to be expressed in kiloNewton (kN) in my calculation.

I know that I can simply insert my preferred unit in the rightmost field of the formula, and indeed is what I am doing currently, but when I have several formula that need this manual entry, it is a little bothersome.

Is there a way to set a preferential unit as a global setting? So that if a result is for example a force, normally expressed in N, smath will expressed in my preferred unit, such as kN?

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline kompre  
#2 Posted : 01 September 2021 00:14:57(UTC)
kompre


Rank: Member

Groups: Registered
Joined: 05/08/2021(UTC)
Posts: 22
Italy

Originally Posted by: Jean Giraud Go to Quoted Post
The other around:
Set all coefficients/formulas in terms of kN
Big red note all results in kN


Nah, I disagree. The point of using units is to be free to use whatever unit make the most sense for that quantity and be sure they will be handled correctly: I can use cm for a variable and m for another and still get the correct sum or whatever without the need to awkwardly, manually, convert them.

Using units prevents lots of dumb errors.

One of the many reason I dislike excel is that I need to be extremely careful how to input data in formulas, and also because I need to multiply for the appropriate conversion factor, formulas get a lot less readable and inelagant.

A quick example: when dealing with steel profiles, dimensions are usually expressed in mm or cm, but I still want to express bending moment in kN*m; if I want to calculate the deflection of a beam, I am working with length (mm), loads (kN), inertial modulus (mm4 or cm4), and elastic modulus (MPa): it's just cleaner to use units
Offline fedeghi  
#3 Posted : 01 September 2021 09:59:37(UTC)
fedeghi


Rank: Advanced Member

Groups: Registered
Joined: 14/09/2013(UTC)
Posts: 90
Italy

Was thanked: 24 time(s) in 16 post(s)
As far as I know, it is not possible to set any preference on the units to be used when evaluating a result.
Since I have the same exact need of handling various input and output units (I'm working in design of pressure vessels, not so distant from structural topics though), I usually insert the desired unit after each result is evaluated, just as you mentioned in your first post.
Offline PompelmoTell  
#4 Posted : 01 September 2021 12:03:52(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 319
Man
Italy
Location: italy

Was thanked: 109 time(s) in 93 post(s)
I think it is possible to modify the units.xml file in your installation (possibly to be done after making a backup copy of the file). However, just to have maximum freedom in use, as you request, it seems absolutely improper to do it. Moreover, the conversion of the result into the desired unit is made only once; Then copy and paste the formula how many times you want in the sheet and it's okay and then you still copy the file for another similar job and is already compliant.

sergio
thanks 1 user thanked PompelmoTell for this useful post.
on 01/09/2021(UTC)
Offline overlord  
#5 Posted : 01 September 2021 22:36:16(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,128
Turkey

Was thanked: 509 time(s) in 339 post(s)
Everybody could please stick with the original question?
Discussion should be on the question unless topic creator asked otherwise.
Answer is, it is not possible yet without serious alterations to units.xml file.
Which you shouldn't do by the way. This would break compatibility with other files.

Regards
thanks 2 users thanked overlord for this useful post.
on 02/09/2021(UTC),  on 02/09/2021(UTC)
Offline overlord  
#6 Posted : 02 September 2021 01:03:20(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,128
Turkey

Was thanked: 509 time(s) in 339 post(s)
Posting same unrelated answer(!) for four times?
This is new. Most forums shall ban users less than this.

Edited by user 02 September 2021 01:04:52(UTC)  | Reason: Not specified

thanks 2 users thanked overlord for this useful post.
on 02/09/2021(UTC),  on 02/09/2021(UTC)
Offline Kenny Lemens  
#7 Posted : 22 August 2022 18:50:45(UTC)
Kenny Lemens


Rank: Advanced Member

Groups: Registered
Joined: 11/01/2018(UTC)
Posts: 133
Man
United States
Location: Wisconsin

Was thanked: 61 time(s) in 38 post(s)
Greetings!

Originally Posted by: kompre Go to Quoted Post
Is there a way to set a preferential unit as a global setting? So that if a result is for example a force, normally expressed in N, smath will expressed in my preferred unit, such as kN?

Yes, you do have the ability to influence the default unit as noted by PompelmoTell:
Originally Posted by: PompelmoTell Go to Quoted Post
I think it is possible to modify the units.xml file in your installation

To this point, you are limited. I have made some attempts and it does not seem possible to change your defaults as it pertains to Metric. However, if you change the 「OutputUnitsSystem」 variable of 「%APPDATA%\SMath\settings.inf」 from 「Metric」 to 「Imperial」, you can achieve some influence. The problem with this is that 「Imperial」 isn't fully supported (e.g.: unitless 'units' such as Degrees and % do not behave correctly). If this is something you are willing to sacrifice, switching to Imperial allows you to 'sort' the values per the XML file. For all entries in 「C:\Program Files (x86)\SMath Studio\entries\Units.xml」 designated as 「system=Imperial」, SMath will take the first name (sorted alphabetically) as your default unit (e.g.: inHg will be your default unit instead of psi because 'i' comes before 'p' ).

However, Units.xml is an important file: I wouldn't modify it unless you are confident in what you are doing.
NOTE: if you do modify Units.xml, make sure to keep a backup copy of the Default Units.xml, but save it to a different part of your computer. If you store multiple xml files within 「C:\Program Files (x86)\SMath Studio\entries」; Smath will try to read all xml files in this directory and will crash/fail to load if it comes across multiple xml files with unit data in them (conflicting data; trying to add data that has already been added).

I can expand on my findings if you view this a worthwhile avenue.
-Kenny Lemens
"No matter where you go, there you are." -Buckaroo Banzai

Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
Users browsing this topic
Guest
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.