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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Combo-box alternative methods of utilisation

SA_9950729
8-Gravel

Combo-box alternative methods of utilisation

Hi All,

 

These may be some stupid questions, but new to this environment from an excel background...

 

I have a number of questions which pertain primarily to how to use data within list / combo-box etc. to be able to extract a number of standard parameters associated with, snippet's below & file attached

 

SA_9950729_1-1622896603765.pngSA_9950729_2-1622896629060.png

 

ACCEPTED SOLUTION

Accepted Solutions
ttokoro
20-Turquoise
(To:SA_9950729)

4 is fixed.

5. Using global  = to select the i index. This is my favorite method.

 

image.pngimage.pngimage.png

 

View solution in original post

8 REPLIES 8

Let me start by saying that I have NEVER been a fan of combo boxes.  And I'm confused by your sheet.  It seems that there are things missing.  (You need to have T.Cat defined to have vlookup work.)

 

That said, What you're showing has drawbacks.  For what you've shown, I would build a table.  (Tables replaced  data arrays from Mathcad 15.  If you select data in EXCEL and paste it into Prime, you get a table with blank headers:

Fred_Kohlhepp_0-1622908058794.png   Fred_Kohlhepp_1-1622908124055.png

One advantage of tables is that they allow units.  (Combo boxes will too, but that can get tricky, look for previous posts!)  In tables, you type variable names and units, and you get arrays.

Fred_Kohlhepp_2-1622908348178.png

And a lookup is just as easy:

Fred_Kohlhepp_3-1622908438442.png

 

 

@Fred_Kohlhepp  thanks for that.

 

At this stage I want to try different methods to give me the best overall options to use Math cad, as have a lot of problems to resolve if I am to be able to make use of this..

 

Appreciate your thought's on what you consider to be a better product, & have updated the sheet I had to include your suggestion, & tweaked what I can of the others to make it more useful..

ttokoro
20-Turquoise
(To:SA_9950729)

4 is fixed.

5. Using global  = to select the i index. This is my favorite method.

 

image.pngimage.pngimage.png

 

@ttokoro many thanks for that & the additional option 🙂

@ttokoro Just to clarify, would you expect the 5th option to look like below, just want to make sure I am not missing a trick, thanks.

SA_9950729_0-1623317350470.png

 

ttokoro
20-Turquoise
(To:SA_9950729)

With Combo box to select the T.cat values from 1 to 4 only.

 

LucMeekes
23-Emerald III
(To:SA_9950729)

Note that when using (Prime) Tables, you are totally free to add any (combination of) units to any of the column variables. With a Combo box, only simple units are supported (You can e.g. have m, but not m/s); the Combo box is a badly integrated (probably third party) element, just like the Chart component.

For clarity I'd propose:

LucMeekes_1-1623328390714.png

You can extend the table in horizontal and vertical direction (see the right side of attached sheet), the TableValue and ParameterSet functions require no further change, unless you want to add error trapping.

 

In addition: you should be very careful when using global definitions (using = ). Consider what happens if you globally define the same variable in different locations of the worksheet...

 

Success!
Luc

 

P.S. Regarding units: Try doing this with the Combobox:

LucMeekes_0-1623328624790.png

 

@LucMeekes Many thanks for your comments, going to take a little digestion to wrap my head around what is going on here 🙂

Announcements

Top Tags