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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Mathcad 15 List Box with Units

coberg
6-Contributor

Mathcad 15 List Box with Units

Hello Everyone,

 

I am wondering if there is a way to assign units to a web control list box/combo box?  I have a list of steel plate thicknesses which I want the user to select and I want the units for these thicknesses to be in inches.  When create the list box it doesn't appear that I can embed the units in the selections as when I try and do that it makes them text strings.  It also doesn't appear that I can add units after the list box either.  I know that just create another variable where I multiply the value from the list box variable by the proper units but I was hoping to not have to do that.  Is there something I am missing?  Thanks!

 

3 REPLIES 3
LucMeekes
23-Emerald III
(To:coberg)

Listboxes in Mathcad are created using a programming language (like VB or Java) and programming languages generally do NOT deal with, or handle, units. That is something different than saying that with a programming language you can create an application that DOES handle units. Mathcad is an example of such a computer application. It's written in C, while C does not handle units (well, not the units of measurement that we're talking about).

It's the same with Excel. This spreadsheet application is not equipped to handle units, but you can build a spreadsheet that contains units.

 

Anyway, I guess your only option is to make sure that you populate the list box with only values that are in inches, and introduce it on the screen as a list box with lengths in inches. Essentially this means: you cannot have mixed units in your list box. Upon return of a selected value, you multiply that value within Mathcad with the unit inch, and you're done.

 

Success!
Luc

coberg
6-Contributor
(To:LucMeekes)

@LucMeekes I had a feeling this would be the case and what you outlined is what I am going to do.  I will have an intermediate variable t' which will be be the list box and then have the actual t value be calculated by multiplying t' by inches.  I was hoping there was something I was missing and that I could introduce units somehow after the list box.  Thanks for the info and the help.

See pls pic and attach

list.png

Announcements

Top Tags