Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello,
i don't want to read excel file to get the material properties for a given section. As you can see in the attached file, i copied the material section properties and pasted it into mathcad prime. Is there a way the user can select the material as i am showing below the table TC= " A22B", and have it look up certain section properties. I was able to do it in MathCAD 15.
Thanks,
Sam
Solved! Go to Solution.
Hi Sam
Q1> Improved Combo Box with both code and size in second column.
Note it starts in the second column because you can cut and paste to this but not the first column. Go figure.
The third column is the returned index.
The combo box only shows the second column when working for selection.
Q2> However what it returns is a vector of two elements.
We simply want the second element
Q3> "t" is working now. File enclosed.
Hi Sam,
1> Move the input table down a bit to show headings of columns.
2> Add the headings
3> You could add units at top of columns but at the moment the text in first row prevents this.
means each column is a vector with text in first row so you cannot add units to text. Once you have all the heading titles in the top of the sheet recommend deleting top row and adding units.
4> Created a combo box that allows you to select one and return an index.
5> Can select a column by its title and use index to get value.
6> Currently index is +1 for text in first row.
Thank you so much, Terry!
Few questions:
1. Is there an easy way to create the combo box of sizes? Did you have to manually input all of them?
2. In the equation for index, what is the subscript (1) for in Choice? Does it provide the row number?
3. Headings below say " this value must be a scalar or a matrix". You got a value for "t", but when i opened the file you attached, it says " this variable is undefined...
Thanks!
Hi Sam
Q1> Improved Combo Box with both code and size in second column.
Note it starts in the second column because you can cut and paste to this but not the first column. Go figure.
The third column is the returned index.
The combo box only shows the second column when working for selection.
Q2> However what it returns is a vector of two elements.
We simply want the second element
Q3> "t" is working now. File enclosed.
Thanks a lot Terry!
Hi Terry,
1. Could you show me the steps how you were able to cut and paste into combo box? I could not do it.
2. How did you add a dash between the section number and the description?
3. it does not accept adding units to headings.
Thanks,
Hi Sam,
Q1> Ill do a video screen capture and post it.
Q@> cut and pasted first col of input table to vector a.
copy and pasted second column of input table to b
concatenation of three strings c = ->(concat(a," - ",b)) with vectorise operator , the middle parameter is quote space dash space quote.
copy c and paste back to combo box.
Q3> The first row of data in the input table is a string. You cannot apply a unit to the column in the input table as it tries to add unit to this string. Prime protests.
clue is to delete that row of string values once you have added variable names to the input tables top row.
Hi Sam,
Video file enclosed as a zip file.
Selecting a large array deeper than height of screen, select the top portion visible on screen, then keeping finger on mouse button use scroll wheel to select all items.
I use the copy and paste buttons Math | Clipboard | Copy/Paste etc
Pasting into the combo box you cannot paste into first column.
Cheers
Terry
I appreciate it and Thank you so much, Terry!