Defining New "Built in Units"
Defining New "Built in Units"
(OP)
I find that I am always inserting the following definitions at the top of every document. Is there a way to set these similar to the built in units, so I don't have to do it everytime? Or are there a similar variable that I should be using instead of these?
1 in_wg := 5.2023 lb/ft^2
1 fpm := 1 ft/min
?.s := 0.075 lb/ft^3
1 in_wg := 5.2023 lb/ft^2
1 fpm := 1 ft/min
?.s := 0.075 lb/ft^3





RE: Defining New "Built in Units"
Before (I think) release 12, you couldn't do it at all.
David
RE: Defining New "Built in Units"
If you are putting the same references into every worksheet, you can make them part of the normal template.
Peter
RE: Defining New "Built in Units"
RE: Defining New "Built in Units"
Create a standard Mathcad worksheet containing your common unit definitions, functions you have created, common constants, and save as units.mcd say. (You don't need to include any standard Mathcad units, functions and constants etc.) Then at the top of your standard worksheet template, include the following expression:
Reference: c:\Mathcad\units.mcd
(Obviously, you must point to the actual path and filename.) In Mathcad 14, this is accomplished using "Insert | Reference" from the main menu - not sure of the procedure in earlier versions.
This will have the effect of inserting all of your standard definitions at the top of all of your calculations. Also, whenever you update your units.mcd file with any new definitions, all your new definitions will immediately be available in all of your worksheets.
Hope this helps!
RE: Defining New "Built in Units"
Oh well - just goes to prove that "great minds think alike"!
RE: Defining New "Built in Units"
I open C:\Program Files\Mathcad\Mathcad 14\units\unit-system-SI.xml
and insert the following code to define fpm (feet per minute)
<unit name="feet_per_minute" quantity-name="velocity">
<symbol name="fpm" xml:lang="en"/>
<displayName xml:lang="en">Feet per minute</displayName>
</unit>
I then open C:\Program Files\Mathcad\Mathcad 14\mpl\mcdunitsystemsi.mpl
and insert the following code
mc_fpm = rv(foot /. minute);
according to the help, that is all I need to do, but when I open up Mathcad I get an error. Can you guys help me figure this out?
RE: Defining New "Built in Units"
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Defining New "Built in Units"