View Single Post
  #5  
Old 09-10-2014, 03:23 AM
papadam papadam is offline
Registered User
 
Join Date: Sep 2014
Location: Switzerland
Posts: 7
Re: Multi language mass table

Kudos to Andy! Thanks to your help I got it to work! For the record I created a minimal example:
Code:
 (sd-create-logical-table "Material-Density-List"
  :columns '(:Material :Density)
  :columnNames (sd-multi-lang-string
      '("Material Type"  "Density in g/mm^3")
      :german
      '("Werkstoff" "Dichte in g/m^3")
      )
 :types '(:string :number)
 :contents  (list
     (list (sd-multi-lang-string "Aluminum"  :german "Aluminium") 0.098)
     (list (sd-multi-lang-string "Steel" :german "Stahl") 0.283)
      )
)
This table has the advantage you enter the relevant data only once. It works in different languages and any user units setting.

Quote:
Originally Posted by Andy Poulsen View Post
... when you create (or modify the contents of) the logical table, you will need to have it populated with the values in user units. However, since Modeling tracks density in g/mm^3, the initial specification must be done in those units.

Perhaps the easiest way to do this is with the function sd-sys-to-user-units,
Although technically possible, I would not recommend this. Most metric users have kg as their mass unit. So if you convert the units you get 0.00000... kg/mm'3 which is confusing.

I could imagine to improve the above sample with a hard coded division by 1000. So in the above example you would enter
Code:
(list (sd-multi-lang-string "Aluminum" :german "Aluminium") 9.8)
and you would still get the correct mass. Is that possible?

Last edited by papadam; 09-10-2014 at 09:41 PM. Reason: added forgotten quotes
Reply With Quote