×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Defining New "Built in Units"

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

RE: Defining New "Built in Units"

What version are you using?  After Release 12 or 13 the help is pretty clear on how to define your own units and it isn't easy.  You have to get into some pretty scary control files (the kind that an extra space will cause the program to fail).  I have some units that I wanted to include, but after reading the detailed help I bailed.

Before (I think) release 12, you couldn't do it at all.

David

RE: Defining New "Built in Units"

One possibility is to define all your units in a Mcad file and insert that file as a reference at the top of your worksheets (insert > reference).  This is also a good way to insert user functions.  Copying/pasting a collapsed area is another possibility.

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"

It is better to use the identical operator (three parallel lines). This way you can write it at any place on the document. You can create a file with all your definitions and when you start a new project load this file and save it with a the new name for the project.

RE: Defining New "Built in Units"

Why not try the "Reference" function? (Not sure in which version this was introduced.)

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"

pstuckey beat me to the punch!

Oh well - just goes to prove that "great minds think alike"!

RE: Defining New "Built in Units"

(OP)
Thanks everyone for the help.  I think a collaspable area in a template will work, but I want to figure out how to define my own unit.  I looked in the help as zdas04 mentioned and tried but I keep getting an error when I open up Mathcad.

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"

I usually do it this way: fpm:=60/5280mph, where "mph" is a build in unit. So, if you then type in Vel:=1mph, Vel=88fpm comes out provided you click on the solution of 1.467ft/s and put "fpm" into the place holder.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close