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

Creating a drop down list.

SOLVED
yoohooos
11-Garnet

Creating a drop down list.

What I'm trying to do is, I have a data for aluminum properties(shown below) where I want to be able to input/select alloy type, temper, and product for that alloy. Then I would like to be able to get the properties of that selected metal. This topic (their Mathcad looks very different from mine, idk why) have asked the same thing that I want(although, I have 3 inputs, while this topic has only one input) but the problem is that couldn't follow the steps in there and am completely lost.

 

I'm very new to Mathcad and my Mathcad doesn't have any add-on(if that's needed), please let know what I need to do if I have to.

 

Thank you very much!

Annotation 2020-05-13 103017.png

1 ACCEPTED SOLUTION

Accepted Solutions

Certainly you may. Here's an example:

LucMeekes_0-1589453625668.png

Of course you can make the list a simple 2D matrix, which would simplify the adressing to just one level, but it would require that you duplicate your types and other selection criteria throughout.

Here's an example, with a function that extracts data based on three input parameters:

LucMeekes_0-1589492133486.png

But, an actual 'drop-down-list' as shown in the post you referred to, is not possible in Prime. You must realise that Prime is a new(er) development than Mathcad. It looks differently (as you saw), it behaves differently, and it has a different feature set...

But if you have a license for (any version of) Prime, that very same license file can also be used to install (on the same PC) and use Mathcad 15 up to its full feature set.

 

Success!

Luc

View solution in original post

7 REPLIES 7

Something along this line?

LucMeekes_0-1589392591409.png

It seems to me that you need further data. The alloy and temper together do not uniqueliy identify the other parameters in most cases.

But anyway, you need no special stuff with prime, just prime suffices.

 

Success!
Luc

 

 

Sorry, you are right. Yes, and product. 

 

How do I do that thought?

May I ask, how does indexing or obtaining values works on this type of matrix?

Certainly you may. Here's an example:

LucMeekes_0-1589453625668.png

Of course you can make the list a simple 2D matrix, which would simplify the adressing to just one level, but it would require that you duplicate your types and other selection criteria throughout.

Here's an example, with a function that extracts data based on three input parameters:

LucMeekes_0-1589492133486.png

But, an actual 'drop-down-list' as shown in the post you referred to, is not possible in Prime. You must realise that Prime is a new(er) development than Mathcad. It looks differently (as you saw), it behaves differently, and it has a different feature set...

But if you have a license for (any version of) Prime, that very same license file can also be used to install (on the same PC) and use Mathcad 15 up to its full feature set.

 

Success!

Luc

View solution in original post

Edit: problem solved. Thank you very much! I really appreciate everything.

 

Thank you very much! That is very rigor. I was trying to use the first method (multi-dimensions matrix) and use the vlookup function, it gave me error saying that the value isn't integer. How should I get around this problem? 

Here's your problem:

LucMeekes_0-1589537466598.png

Success!
Luc

Guess you can split your problem into two parts - 1) the selection of the input values and 2) reading the appropriate table values.

As your topic is "Creating a drop down list" you probably are looking for the first.

 

The simple and short answer is - you can't create a drop down list in Prime.
In Mathcad 15 and below we are able to use controls like sliders, check boxes, list boxes etc. So building a drop down list for the user to select a value and avoiding illegal input was possible relatively easy. Prime uses a core similar to Mathcad, but is based on a completely new code base. PTC did a lot wrong when they developed Prime, and even in version 6, Prime is still lagging behind the old Mathcad. So there are still no controls available in Prime,  which means that unfortunately you cannot implement dropdown menus in Prime. You have to resort to simple assignments like Alloy:=5083  temper:="H321" etc. You can't avoid illegal inputs or typos that way and would have to deal with them in some other way.
You may think of providing the allowed values for an item in form of an array an let the user select the index to that array instead of the value itself. While this would avoid typos and help to detect illegal values its sure is a lot more cumbersome and uncomfortable than having a list box.

 

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."