cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Defining Units

awibroe
14-Alexandrite

Defining Units

Hello everyone!

I was not sure which topic to put this in, but I am trying to define my own units. This is a unit of cost per mass in analysing freight rates. i.e. My desired unit is to measure freight in £ per tonne. Is this possible?

Thanks

Andy

6 REPLIES 6
vlehner
14-Alexandrite
(To:awibroe)

Hi Andy,

What about this:

Volker

Andy:

I found the answer in a "how to" document somewhere here on the PTC site.  It's not well documented, but if you want an entirely new unit (for example petroleum barrels) you can do so by typing:

"bbls", <ctrl-u>, ":=", "158.987", "L"

which now defines "bbls" as a volumetric unit equal to 159 litres.

Once you've defined things as base units, you can create ratios (for example, I usually work in bbls/day not m3/s)

I put all of my "preferred" units into a separate worksheet which I "include" in my work-related sheets.  I enclose a copy of that worksheet.  Each of the units was defined using the name+<ctrl-u> syntax.  You'll note that for easy entry, I've defined some units like ft3 in terms of units directly in MathCad. I don't need to enter (ft*ft*ft) or use the shift key, I can just type ft3 and the application knows what I want.

You could probably define your unit as pspt (pounds sterling per tonne) and then you could enter your values, do all your calculations in SI and convert when necessary.

Bob

You can also put these units, constants, formulas, etc. into an area, close the area, and save the file as a template.

When you launch a template file, all of the formatting, and all of that personal information is already there.

That <ctl-u> part was what I was missing: I was trying to do it through the tool bar which does something else.

LucMeekes
23-Emerald III
(To:JohnTrantham)

 

"I was trying to do it through the tool bar which does something else."

Which part of 'the tool bar'?

What [Ctrl-U]  does is toggle between labels, specifically between the current label and 'Unit', and from then on between 'Unit' and 'Variable'. You can accomplish the same by using the menu bar:

LucMeekes_1-1627396888465.png

Note that this is something completely different from inserting a unit (from the predefined list of units), which can be accessed on the ribbon to the right of the box with labels.

 

Success!
Luc

 

Announcements

Top Tags