1 Pages (10 items)
default units - how to set default units - Messages
#1 Posted: 4/6/2018 12:04:43 PM
Hi, I am trying to set the default units to Imperial (as required by my work) by changing the Units.xml file. However SMath crashes when I try to open it with the edited file in place. Can someone help identify my problem? My Units.xml file follows:
mod: code too long, moved under spoiler; code tags added.
<?xml version="1.0" encoding="utf-8"?>
<entries lang:default="eng" xmlns="http://smath.info/schemas/entries/1.0" xmlns:lang="http://smath.info/schemas/entries/1.0">
<prefixes>
<add factor="1" exp="-24" name="y yocto" lang:rus="и иокто" />
<add factor="1" exp="-21" name="z zepto" lang:rus="з зепто" />
<add factor="1" exp="-18" name="a atto" lang:rus="а атто" />
<add factor="1" exp="-15" name="f femto" lang:rus="ф фемто" />
<add factor="1" exp="-12" name="p pico" lang:rus="п пико" />
<add factor="1" exp="-9" name="n nano" lang:rus="н нано" />
<add factor="1" exp="-6" name="μ micro" lang:rus="мк микро" />
<add factor="1" exp="-3" name="m milli" lang:rus="м милли" />
<add factor="1" exp="-2" name="c centi" lang:rus="с санти" />
<add factor="1" exp="-1" name="d deci" lang:rus="д деци" />
<add factor="1" exp="1" name="da deka" lang:rus="да дека" />
<add factor="1" exp="2" name="h hecto" lang:rus="г гекто" />
<add factor="1" exp="3" name="k kilo" lang:rus="к кило" />
<add factor="1" exp="6" name="M mega" lang:rus="М мега" />
<add factor="1" exp="9" name="G giga" lang:rus="Г гига" />
<add factor="1" exp="12" name="T tera" lang:rus="Т тера" />
<add factor="1" exp="15" name="P peta" lang:rus="П пета" />
<add factor="1" exp="18" name="E exa" lang:rus="Э экза" />
<add factor="1" exp="21" name="Z zetta" lang:rus="З зетта" />
<add factor="1" exp="24" name="Y yotta" lang:rus="И иотта" />
<add factor="2^10" name="ki kibi" lang:rus="ки киби" />
<add factor="2^20" name="Mi mebi" lang:rus="Ми меби" />
<add factor="2^30" name="Gi gibi" lang:rus="Ги гиби" />
<add factor="2^40" name="Ti tebi" lang:rus="Ти теби" />
</prefixes>
<dimensions>
<add id="613" />
<add baseunit="sr" id="588" />
<add baseunit="ft" id="268" />
<add baseunit="s" id="284" />
<add baseunit="slug" id="273" />
<add baseunit="K" id="283" />
<add baseunit="bit" id="423" />
<add baseunit="A" id="259" />
<add baseunit="cd" id="269" />
<add baseunit="mol" id="282" />
<add baseunit="dB" id="591" />
<add baseunit="ft3" connection="ft^3" id="289" />
<add baseunit="Hz" connection="s^-1" id="265" />
<add baseunit="C" connection="A*s" id="256" />
<!-- <add baseunit="D" connection="A*s*m" id="595" />
<add baseunit="R" connection="{A*s}/kg" id="594" />
<add baseunit="Gy" connection="m^2/s^2" id="258" />
<add baseunit="T" connection="kg/{A*s^2}" id="272" /> -->
<add baseunit="psf" connection="slug/{ft*s^2}" id="279" />
<add baseunit="lbf" connection="{slug*ft}/s^2" id="262" />
<add baseunit="ftlb" connection="{slug*ft^2}/s^2" id="260" />
<!-- <add baseunit="W" connection="{kg*m^2}/s^3" id="278" />
<add baseunit="Wb" connection="{kg*m^2}/{A*s^2}" id="592" />
<add baseunit="V" connection="{kg*m^2}/{A*s^3}" id="277" />
<add baseunit="H" connection="{kg*m^2}/{A^2*s^2}" id="267" />
<add baseunit="Ω" connection="{kg*m^2}/{A^2*s^3}" id="280" />
<add baseunit="S" connection="{A^2*s^3}/{kg*m^2}" id="593" />
<add baseunit="F" connection="{A^2*s^4}/{kg*m^2}" id="254" />
<add baseunit="lx" connection="{cd*sr}/m^2" id="590" />
<add baseunit="lm" connection="cd*sr" id="589" />
<add baseunit="kat" connection="mol/s" id="255" />
<add baseunit="P" connection="kg/{m*s}" id="287" />
<add baseunit="St" connection="m^2/s" id="288" />
<add baseunit="Oe" connection="A/m" id="597" />
<add connection="kg/m" id="596" />
<add connection="cd/m^2" id="266" /> -->
<add connection="ft^-1" id="281" />
<add connection="ft^2" id="253" />
<add connection="ft/s" id="286" />
<add connection="ft/s^2" id="250" />
</dimensions>
<units>
<property dimension="613" id="252">
<add factor="1" exp="-2" system="All" id="634">
<synonym name="%" />
</add>
<add factor="1" exp="-3" system="All" id="635">
<synonym name="‰" />
</add>
<add factor="1" exp="-6" system="All" id="636">
<synonym name="ppm" />
</add>
<add factor="1" exp="-9" system="All" id="637">
<synonym name="ppb" />
</add>
<add factor="1" system="All" id="294">
<synonym name="rad" lang:rus="рад" />
</add>
<add factor="π/180" system="All" id="293">
<synonym name="° deg" lang:ger="°" lang:dan="° grader" />
</add>
<add factor="π/{180*60}" system="All" id="679">
<synonym name="\0027\ arcmin" />
</add>
<add factor="π/{180*60*60}" system="All" id="680">
<synonym name="\0022\ arcsec" />
</add>
<add factor="π/200" system="All" id="517">
<synonym name="grad gon" lang:rus="град гон" lang:dan="gon nygrader" lang:ger="Gon" />
</add>
<add factor="2*π" system="All" id="454">
<synonym name="rev" lang:dan="omgange" lang:ger="U" />
</add>
</property>
<property dimension="265" id="540">
<add factor="π/30" system="All" id="465">
<synonym name="rpm" />
</add>
<add factor="π/1800" system="All" id="541">
<synonym name="rph" />
</add>
</property>
<property dimension="253">
<add factor="4.3560" exp="4" system="Imperial" id="295">
<synonym name="acre" lang:rus="акр" />
</add>
<!-- <add factor="1" exp="-28" system="All" id="312">
<synonym name="barn" lang:rus="б бн" />
</add>
<add factor="1" exp="2" system="Metric" id="638">
<synonym name="a" lang:rus="а" lang:ger="ar"/>
<extension for="a" lang:rus="а" lang:ger="ar">
<prefix name="c" id="640"/>
<prefix name="da" id="639"/>
<prefix name="h" id="313"/>
</extension>
</add> -->
</property>
<!-- <property dimension="254">
<add factor="1" system="All" id="383">
<synonym name="F farad" lang:rus="Ф" />
<extension for="F" lang:rus="Ф">
<prefix name="m" id="384" />
<prefix name="μ" id="385" />
<prefix name="n" id="386" />
<prefix name="p" id="387" />
</extension>
</add>
</property>
<property dimension="255">
<add factor="1" system="All" id="417">
<synonym name="kat katal" />
</add>
</property> -->
<property dimension="256">
<add factor="1" system="All" id="388">
<synonym name="C" lang:rus="Кл" lang:dan="C" />
<extension for="C" lang:rus="Кл" lang:dan="C">
<prefix name="m" id="389" />
<prefix name="μ" id="390" />
<prefix name="n" id="391" />
<prefix name="p" id="392" />
</extension>
</add>
</property>
<!-- <property dimension="258">
<add factor="1" system="Metric" id="405">
<synonym name="Gy" lang:rus="Гр" />
</add>
<add factor="1" system="Metric" id="406">
<synonym name="Sv" lang:rus="Зв" />
</add>
</property> -->
<property dimension="259">
<add factor="1" system="Metric" id="393">
<synonym name="A" lang:rus="А" />
<extension for="A" lang:rus="А">
<prefix name="k" id="394" />
<prefix name="m" id="395" />
<prefix name="μ" id="396" />
<prefix name="n" id="397" />
<prefix name="p" id="398" />
</extension>
</add>
<add factor="2/5*π" system="Metric" id="598">
<synonym name="Gi" />
</add>
</property>
<property dimension="260">
<add factor="1" system="Imperial" id="355">
<synonym name="ftlb" lang:rus="Дж" />
<!-- <extension for="J" lang:rus="Дж">
<prefix name="T" id="356" />
<prefix name="G" id="357" />
<prefix name="M" id="358" />
<prefix name="k" id="359" />
<prefix name="m" id="360" />
<prefix name="μ" />
<prefix name="n" />
<prefix name="p" />
</extension>
</add>
<add factor="4.1868" system="Metric" id="361">
<synonym name="cal" lang:rus="кал" />
<extension for="cal" lang:rus="кал">
<prefix name="k" id="362" />
</extension> -->
</add>
<add factor="7.78169" exp="2" system="Imperial" id="440">
<synonym name="BTU" />
</add>
<!-- <add factor="1" exp="-7" system="All" id="468">
<synonym name="erg" lang:rus="эрг" />
</add> -->
</property>
<property dimension="262">
<add factor="1" system="Imperial" id="340">
<synonym name="lbf lb.f" lang:rus="Н" />
<!-- <extension for="N" lang:rus="Н">
<prefix name="T" id="341" />
<prefix name="G" id="342" />
<prefix name="M" id="343" />
<prefix name="k" id="344" />
<prefix name="m" id="345" />
<prefix name="μ" id="346" />
<prefix name="n" />
<prefix name="p" />
</extension>
</add>
<add factor="1" exp="-5" system="Metric" id="347">
<synonym name="dyn dyne" lang:rus="дин" />
</add>
<add factor="4.4482216152605" system="Imperial" id="437">
<synonym name="lbf" />
</add>
<add factor="9.80665" system="All" id="455">
<synonym name="kgf" lang:rus="кгс" lang:ger="kp" />
</add>
<add factor="9.80665" exp="3" system="All" id="456">
<synonym name="tonnef" lang:rus="тс" lang:ger="Mp" />
</add>
<add factor="8.896443230521" exp="3" system="All" id="457">
<synonym name="tonf" /> -->
</add>
<add factor="1" exp="3" system="All" id="458">
<synonym name="kip" />
</add>
</property>
<property dimension="265">
<add factor="1" system="Metric" id="324">
<synonym name="Hz" lang:rus="Гц" />
<extension for="Hz" lang:rus="Гц">
<prefix name="T" />
<prefix name="G" id="325" />
<prefix name="M" id="326" />
<prefix name="k" id="327" />
</extension>
</add>
<add factor="1/60" system="All" id="466">
<synonym name="radpm" />
</add>
</property>
<!-- <property dimension="590">
<add factor="1" system="Metric" id="407">
<synonym name="lx" lang:rus="лк" />
</add>
</property>
<property dimension="267">
<add factor="1" system="Metric" id="399">
<synonym name="H henry" lang:rus="Гн" />
<extension for="H" lang:rus="Гн">
<prefix name="m" id="400" />
<prefix name="μ" id="401" />
</extension>
</add>
</property> -->
<property dimension="423">
<add factor="1" system="All" id="424">
<synonym name="bit" lang:rus="бит" />
<extension for="bit" lang:rus="бит">
<prefix name="T" id="584" />
<prefix name="G" id="585" />
<prefix name="M" id="586" />
<prefix name="k" id="587" />
</extension>
</add>
<add factor="8" system="All" id="425">
<synonym name="B byte" lang:rus="Б байт" />
<extension for="B" lang:rus="Б">
<prefix name="T" id="427" />
<prefix name="G" id="428" />
<prefix name="M" id="429" />
<prefix name="k" id="430" />
<prefix name="Ti" id="432" />
<prefix name="Gi" id="433" />
<prefix name="Mi" id="434" />
<prefix name="ki" id="435" />
</extension>
</add>
</property>
<property dimension="268">
<add factor="1" system="Imperial" id="296">
<synonym name="ft" lang:rus="м" />
<!-- <synonym name="micron" prefix="μ" />
<extension for="m" lang:rus="м">
<prefix name="p" id="304" />
<prefix name="n" id="303" />
<prefix name="μ" id="302" />
<prefix name="m" id="301" />
<prefix name="c" id="300" />
<prefix name="d" id="299" />
<prefix name="k" id="298" />
</extension> -->
</add>
<add factor="5.28" exp="3" system="All" id="297">
<synonym name="mi mile" lang:rus="миль" />
</add>
<!-- <add factor="1" exp="-10" system="Metric" id="305">
<synonym name="Angstrom Å" lang:rus="ангстрем Å" lang:dan="Ångstrøm Å" />
</add>
<add factor="5.291772108" exp="-11" system="All" id="306">
<synonym name="bohr" />
</add>
<add factor="3.048" exp="-1" system="Imperial" id="307">
<synonym name="ft" lang:rus="фут" />
</add>
<add factor="2.01168" exp="2" system="Imperial" id="308">
<synonym name="furlong" lang:rus="фурлонг" />
</add> -->
<add factor="8.333333333333" exp="-2" system="Imperial" id="309">
<synonym name="in" lang:rus="дюйм" lang:dan="tommer in" />
</add>
<add factor="3" exp="0" system="Imperial" id="310">
<synonym name="yd" lang:rus="ярд" lang:dan="yd yard" />
</add>
<!-- <add factor="1.7018" system="Imperial" id="311">
<synonym name="Smoot" lang:rus="смут" />
</add> -->
</property>
<property dimension="269">
<add factor="1" system="Metric" id="408">
<synonym name="cd" lang:rus="кд" />
</add>
</property>
<!-- <property dimension="272">
<add factor="1" system="Metric" id="410">
<synonym name="T tesla" lang:rus="Тл" />
</add>
<add factor="1" exp="-4" system="Imperial" id="411">
<synonym name="G gauss" lang:rus="Гс" />
</add>
</property> -->
<property dimension="273">
<add factor="1" exp="-3" system="Imperial" id="332">
<synonym name="slug" lang:rus="г" />
<!-- <extension for="g" lang:rus="г">
<prefix name="k" id="328" />
<prefix name="M" id="329" />
<prefix name="m" id="333" />
<prefix name="μ" id="334" />
</extension>
</add>
<add factor="2" exp="-4" system="All" id="599">
<synonym name="ct" lang:rus="кар" />
</add>
<add factor="1" exp="3" system="All" id="330">
<synonym name="t tonne" lang:rus="т" /> -->
</add>
<add factor="1" exp="3" system="Imperial" id="331">
<synonym name="ton" />
</add>
<add factor="6.25" exp="-2" system="Imperial" id="335">
<synonym name="oz ounce" />
</add>
<add factor="3.1081" exp="-2" system="Imperial" id="336">
<synonym name="lb lb.m lbm pound" lang:dan="pund lb lb.m lbm" />
</add>
<!-- <add factor="1.45939029372064" exp="1" system="Imperial" id="436">
<synonym name="slug" />
</add> -->
</property>
<!-- <property dimension="277">
<add factor="1" system="Metric" id="373">
<synonym name="V volt" lang:rus="В" />
<extension for="V" lang:rus="В">
<prefix name="k" id="374" />
<prefix name="m" id="375" />
<prefix name="μ" id="376" />
<prefix name="n" id="377" />
<prefix name="p" id="378" />
</extension>
</add>
</property>
<property dimension="278">
<add factor="1" system="Metric" id="363">
<synonym name="W watt" lang:rus="Вт" />
<extension for="W" lang:rus="Вт">
<prefix name="G" id="364" />
<prefix name="M" id="365" />
<prefix name="k" id="366" />
<prefix name="m" id="367" />
<prefix name="μ" id="368" />
<prefix name="n" id="369" />
<prefix name="p" id="370" />
</extension>
</add>
<add factor="7.456998715822702" exp="2" system="Imperial" id="371">
<synonym name="hp" lang:dan="hk" />
</add>
<add factor="7.46043" exp="2" system="Imperial" id="372">
<synonym name="hhp" />
</add>
</property> -->
<property dimension="279">
<add factor="1" system="Imperial" id="348">
<synonym name="psf" lang:rus="Па" />
<!-- <extension for="Pa" lang:rus="Па">
<prefix name="G" id="349" />
<prefix name="M" id="350" />
<prefix name="k" id="351" />
</extension> -->
</add>
<add factor="2.11621662367394" exp="3" system="All" id="352">
<synonym name="atm" lang:rus="атм" />
</add>
<!-- <add factor="1" exp="5" system="Metric" id="353">
<synonym name="bar" lang:rus="бар" />
</add>
<add factor="1.3332236842105263" exp="2" system="Metric" id="354">
<synonym name="torr" lang:ger="Torr" />
</add> -->
<add factor="1.44" exp="2" system="Imperial" id="438">
<synonym name="psi" />
</add>
<!-- <add factor="4.78802589803358" exp="1" system="Imperial" id="439">
<synonym name="psf" />
</add> -->
<add factor="1.44" exp="-1" system="Imperial" id="441">
<synonym name="ksi" />
</add>
<add factor="1" exp="-3" system="Imperial" id="467">
<synonym name="ksf" />
</add>
</property>
<!-- <property dimension="280">
<add factor="1" system="Metric" id="402">
<synonym name="Ω ohm" lang:rus="Ω Ом" />
<extension for="Ω" lang:rus="Ω">
<prefix name="M" id="403" />
<prefix name="k" id="404" />
<prefix name="m" id="583" />
</extension>
</add>
</property> -->
<property dimension="281">
<add factor="1.2" exp="1" system="All" id="418">
<synonym name="dpi" />
</add>
</property>
<property dimension="282">
<add factor="1" system="Metric" id="379">
<synonym name="mol" lang:rus="моль" lang:dan="mol" />
<extension for="mol" lang:rus="моль" lang:dan="mol">
<prefix name="k" id="380" />
<prefix name="m" id="381" />
<prefix name="μ" id="382" />
<prefix name="n"/>
</extension>
</add>
<add factor="4.5359237" exp="2" system="Imperial" id="547">
<synonym name="lbmol" />
</add>
</property>
<property dimension="283">
<add factor="1" system="Metric" id="421">
<synonym name="K" lang:rus="К" />
</add>
<add factor="5/9" system="Imperial" id="422">
<synonym name="°Ra" />
</add>
<add factor="1" system="Metric" id="617">
<synonym name="Δ°C" />
</add>
<add factor="5/4" system="Metric" id="619">
<synonym name="Δ°Re" />
</add>
<add factor="5/9" system="Metric" id="618">
<synonym name="Δ°F" />
</add>
<!-- Non-linear units -->
<add factor="1" offset="273.15" system="Metric" id="290">
<synonym name="°C" />
</add>
<add factor="5/4" offset="273.15" system="All" id="291">
<synonym name="°Re" />
</add>
<add factor="5/9" offset="273.15-32*5/9" system="Imperial" id="292">
<synonym name="°F" />
</add>
</property>
<property dimension="284">
<add factor="1" system="All" id="314">
<synonym name="s sec" lang:rus="с" lang:dan="s sek" />
<extension for="s" lang:rus="с" lang:dan="s">
<prefix name="k" id="319" />
<prefix name="m" id="320" />
<prefix name="μ" id="321" />
<prefix name="n" id="322" />
<prefix name="p" id="323" />
</extension>
</add>
<add factor="3.1556925975" exp="7" system="All" id="315">
<synonym name="yr" lang:rus="год" lang:dan="år" lang:ger="a" />
</add>
<add factor="8.64" exp="4" system="All" id="316">
<synonym name="day" lang:rus="сут" lang:dan="dag" lang:ger="d" />
</add>
<add factor="3.6" exp="3" system="All" id="317">
<synonym name="hr" lang:rus="ч" lang:dan="timer" />
</add>
<add factor="6" exp="1" system="All" id="318">
<synonym name="min" lang:rus="мин" lang:dan="minutter min" />
</add>
</property>
<property dimension="286">
<!-- <add factor="5/18" system="Metric" id="414">
<synonym name="kph" lang:rus="кмч" lang:ger="kmh" />
</add> -->
<add factor="1.46667" exp="0" system="Imperial" id="415">
<synonym name="mph" />
</add>
<!-- <add factor="5.14444" exp="-1" system="Imperial" id="413">
<synonym name="knot kn" lang:rus="уз" lang:dan="knob" lang:ger="Knoten" />
</add>
</property>
<property dimension="287">
<add factor="1" exp="-1" system="Metric" id="416">
<synonym name="P poise" lang:rus="пз" />
</add> -->
</property>
<!-- <property dimension="288">
<add factor="1" exp="-4" system="Imperial" id="419">
<synonym name="St stokes" lang:rus="Ст" />
</add>
</property> -->
<property dimension="289">
<!-- <add factor="1" exp="-3" system="Metric" id="337">
<synonym name="L" lang:rus="л" lang:ger="l" />
<extension for="L" lang:rus="л" lang:ger="l">
<prefix name="m" id="338" />
</extension>
</add> -->
<add factor="1.33681" exp="-1" system="Metric" id="339">
<synonym name="gal" lang:rus="гал" />
</add>
</property>
<property dimension="265">
<add factor="1" system="Metric" id="600">
<synonym name="Bq" lang:rus="Бк" />
<extension for="Bq" lang:rus="Бк">
<prefix name="k" id="641"/>
<prefix name="M" id="642"/>
<prefix name="G" id="643"/>
</extension>
</add>
<add factor="3.7" exp="10" system="Imperial" id="601">
<synonym name="Ci" lang:rus="Ки" />
<extension for="Ci" lang:rus="Ки">
<prefix name="μ" id="622"/>
<prefix name="m" id="623"/>
</extension>
</add>
</property>
<property dimension="588">
<add factor="1" system="All" id="602">
<synonym name="sr" lang:rus="ср" />
</add>
</property>
<!-- <property dimension="589">
<add factor="1" system="All" id="409">
<synonym name="lm" lang:rus="лм" />
</add>
</property>
<property dimension="592">
<add factor="1" system="Metric" id="603">
<synonym name="Wb" lang:rus="Вб" />
</add>
<add factor="1" exp="-8" system="All" id="604">
<synonym name="Mx" lang:rus="Мкс" />
</add>
</property> -->
<property dimension="591">
<add factor="1" exp="1" system="All">
<synonym name="B" lang:rus="Б" />
<extension for="B" lang:rus="Б">
<prefix name="d" id="605"/>
<prefix name="da" id="644" />
<exclude name="B" />
</extension>
</add>
</property>
<!-- <property dimension="593">
<add factor="1" system="Metric" id="606">
<synonym name="S" lang:rus="См" />
<extension for="S" lang:rus="См">
<prefix name="p" id="645"/>
<prefix name="μ" id="646"/>
<prefix name="m" id="647"/>
<prefix name="d" id="648"/>
</extension>
</add>
</property>
<property dimension="594">
<add factor="1" exp="-2" system="Imperial" id="607">
<synonym name="R" lang:rus="Р" />
<extension for="R" lang:rus="Р">
<prefix name="μ" id="620"/>
<prefix name="m" id="621"/>
</extension>
</add>
</property>
<property dimension="595">
<add factor="3.33564095" exp="-30" system="Metric" id="608">
<synonym name="D" lang:rus="Д" />
</add>
</property>
<property dimension="596">
<add factor="1.11" exp="-7" system="Metric" id="609">
<synonym name="den" lang:rus="ден" />
</add>
</property>
<property dimension="597">
<add factor="7.95775" exp="1" system="Metric" id="610">
<synonym name="Oe" lang:rus="Э" />
</add>
</property>
<property dimension="266">
<add factor="1" exp="4" system="Metric" id="611">
<synonym name="sb" lang:rus="сб" />
</add>
</property> -->
</units>
</entries>
mod: code too long, moved under spoiler; code tags added.
#2 Posted: 4/6/2018 12:24:36 PM
Hello [userlink]sarregouset[/userlink]
look here: https://en.smath.info/forum/yaf_postsm37475_Units-and-matrices.aspx#post37475
look here: https://en.smath.info/forum/yaf_postsm37475_Units-and-matrices.aspx#post37475
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 4/6/2018 12:32:24 PM
Thanks; that's better than nothing. It would still be nice to know how to set default units (in vs ft) via Units.xml if there is no other way.
#4 Posted: 4/9/2018 10:46:23 AM
Scratch that; it's worse than nothing. The OutputUnitsSystem=Imperial setting seems to break the unit-display override feature. With it set, I can no longer specify which derived unit I want the results displayed in - I have to use the default. For example:
a:=1lbf
b:=1ft
a/b^2=1lbf/ft^2
a/b^2=70.7262lbf/ft^2inHg*psf
#5 Posted: 4/9/2018 12:29:49 PM
The point is, if I use the setting Davide suggested (OutputUnitsSystem=Imperial), I canNOT "append the result with the appropriate unit", whereas with the =Metric setting I can. In other words, this Smath feature does not work. Thanks anyway.
#6 Posted: 4/9/2018 1:32:01 PM
WroteThanks; that's better than nothing. It would still be nice to know how to set default units (in vs ft) via Units.xml if there is no other way.
Yes, it is a known bug (SS-2286); as you can see from the post I've linked above, it should be considered an experimental feature (this is enforced by the fact that you have to edit the settings file to enable it).
Loalized default units are part of [SS-1], still opened.
I do not encourage to modify the unts.xml file except for hardcore users on portable executables, since the file it is overwritten on software installations and not linked within the worksheets, that it means you cannot read a worksheet as it was created unless you have the same units file.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#7 Posted: 4/9/2018 1:51:47 PM
Thanks for those details. I noticed it was overwritten but did not it was not linked within worksheets. Looks like I am stuck with Metric unless something happens on [SS-1]. Thanks for your time.
#8 Posted: 8/22/2022 7:30:59 PM
Greetings,
If you are using (OutputUnitsSystem=Imperial); then there is a quick way to force 'inches' as the default unit.
- 1) Edit the Units.xml file
- 2) Locate the 'inches' factor
- 3) Edit the name: name="in" to name="ⅰn in"
- 4) Save & Close Units.xml
When you reopen Smath, you should note [ⅰn] as the preferred unit.
This works because [ⅰ] is a special character; it looks like an [i], but it sorts before [f]; thus it is your first to display.
A bit late, but I hope this helps the next person,
-Kenny Lemens, P.E.
WroteThanks; that's better than nothing. It would still be nice to know how to set default units (in vs ft) via Units.xml if there is no other way.
If you are using (OutputUnitsSystem=Imperial); then there is a quick way to force 'inches' as the default unit.
- 1) Edit the Units.xml file
- 2) Locate the 'inches' factor
- 3) Edit the name: name="in" to name="ⅰn in"
- 4) Save & Close Units.xml
When you reopen Smath, you should note [ⅰn] as the preferred unit.
This works because [ⅰ] is a special character; it looks like an [i], but it sorts before [f]; thus it is your first to display.
<!-- used [ⅰ] to sort in in front of other Imperial units (KML) 2022-08-19 -->
<add factor="2.54" exp="-2" system="Imperial" id="309">
<synonym name="ⅰn in" lang:rus="дюйм" lang:dan="tommer in" />
</add>
A bit late, but I hope this helps 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
#9 Posted: 8/23/2022 9:58:56 AM
Thanks, but that doesn't help due to bug SS-2286 described above.
#10 Posted: 8/23/2022 10:16:19 AM
Greetings,
I am still exploring the issues outlined in [SS-2286]; currently my fixes are:
-̶ ̶C̶r̶e̶a̶t̶e̶ ̶a̶n̶ ̶i̶m̶p̶e̶r̶i̶al̶ ̶u̶n̶i̶t̶ ̶f̶o̶r̶ ̶̶̶a̶c̶c̶e̶l̶e̶r̶a̶t̶i̶o̶n̶
-̶ ̶S̶u̶p̶p̶r̶e̶s̶s̶ ̶u̶n̶s̶u̶p̶p̶o̶r̶t̶e̶d̶ ̶u̶n̶i̶t̶s̶ ̶(̶e̶.̶g̶.̶,̶ ̶%̶ ̶̶a̶n̶d̶ ̶̶d̶e̶g̶r̶e̶̶e̶s̶)
- Redefine some constants in terms of imperial units ( i.e., g=32.2 ft/s² )
- Redefine some units in terms of imperial base units ( e.g., kip=1000lbf )
Far from a solution, but progress none-the-less.
I am currently trying to find a way to declare "Default Units" for system=Metric, but I haven't made much progress in that regard.
[EDIT] It is possible to edit the Units.xml file, so that the 'base units' are in terms of your desired 'default units'. An example to such a document is referenced in this post: https://en.smath.com/forum/yaf_postsm79741_Usable-default-units-for-US.aspx#post79741. There are a lot of rules to construct the Units.xml file correctly; no good way of summarizing the method to assign a custom unit as default.
-Kenny Lemens, P.E.
I am still exploring the issues outlined in [SS-2286]; currently my fixes are:
-̶ ̶C̶r̶e̶a̶t̶e̶ ̶a̶n̶ ̶i̶m̶p̶e̶r̶i̶al̶ ̶u̶n̶i̶t̶ ̶f̶o̶r̶ ̶̶̶a̶c̶c̶e̶l̶e̶r̶a̶t̶i̶o̶n̶
-̶ ̶S̶u̶p̶p̶r̶e̶s̶s̶ ̶u̶n̶s̶u̶p̶p̶o̶r̶t̶e̶d̶ ̶u̶n̶i̶t̶s̶ ̶(̶e̶.̶g̶.̶,̶ ̶%̶ ̶̶a̶n̶d̶ ̶̶d̶e̶g̶r̶e̶̶e̶s̶)
- Redefine some constants in terms of imperial units ( i.e., g=32.2 ft/s² )
- Redefine some units in terms of imperial base units ( e.g., kip=1000lbf )
Far from a solution, but progress none-the-less.
I am currently trying to find a way to declare "Default Units" for system=Metric, but I haven't made much progress in that regard.
[EDIT] It is possible to edit the Units.xml file, so that the 'base units' are in terms of your desired 'default units'. An example to such a document is referenced in this post: https://en.smath.com/forum/yaf_postsm79741_Usable-default-units-for-US.aspx#post79741. There are a lot of rules to construct the Units.xml file correctly; no good way of summarizing the method to assign a custom unit as default.
-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 Pages (10 items)
-
New Posts
-
No New Posts