Skip to main content
8-Gravel
July 16, 2016
Question

How to create a data set in MathCAD Prime 3.1 for mechanical and geometrical steel bars

  • July 16, 2016
  • 8 replies
  • 5621 views

I want to have a bar identifier as bar #1 #2 #3 #4 to #11

for each bar, a diameter and area.

also for each a type of elastic modulus (if steel, if carbon fiber, if glass fiber, etc.)

Yesterday I was told that Mathcad Prime does not offer a drop list box for this. However I was watching youtube and I noticed that using excel can be done. How can I do it and have this information somehow accessible for every calculation I perform like a tool box.

for example when I choose #2 bar then I want all these properties to appear in the calculation without having me to do them all over.

I would like to do these for large data sets.

please advise how. Thank you

8 replies

8-Gravel
July 16, 2016

Q4.png

I am trying to do something like this but for every bar diameter, I just want to be able to type phi sub f and a #1 and just to get the properties of the #1 and corresponding. I do not want all the whole matrix to appear but just for the appropriate bar number I need. How do make this happen?

8-Gravel
July 16, 2016

and also how can I store these tables on the Mathcad system so I do not have to re-do this process every time I want to start a calculation. I will like it to be integrated in the software system like part of the tool box, in the memory of the software.

8-Gravel
July 16, 2016

I can do this one by one but it will take forever. how can I assign this to a large number so I know that for every # bar the correct diameter appear and have it in the system.

12-Amethyst
July 18, 2016

Do you need a look-up table that you can take data from?

f this is what you want to do then I would suggest using a table (example extract from a sheet I have been trying it out with).

The worksheet is in Prime 2, so it should work for prime 3  & 3.1.

The entry D_E returns a single row vector that could be adapted to give results based on different materials.

(Note that to use it as a 'real' vector you will need to transpose it to a single column vector)

Hope this gives you a few ideas to try

Regards

Andy

25-Diamond I
July 18, 2016

Whats wrong with using the vector/matrix index ([)?

By default numbering begins with 0 but you can change this using the system variable ORIGIN

If you insist on your names with the # character, you would have to do it that way:

23-Emerald I
July 18, 2016

You can embed an EXCEL table in the spreadsheet, with a little creative addressing, have what you want.

1-Visitor
July 18, 2016

In addition to what others have said, also take a look at the matrix lookup functions, such as "vlookup".

Also, there's no way to embed this information into the program, but you can set up a worksheet and save it as a template.  I assume you can then somehow set it as your default template.

10-Marble
August 31, 2016

Hi Juan,

Try using the sample file that I have created & attached along with for your reference. Since Prime 3.1 does not have a drop down menu option & it does not appear that it is soon going to have this functionality what you can do is as follows:

1. Create a database in an excel file embedded in the worksheet.

2. Use an input variable to identify the bar number for which you want to call the diameter & area. This input variable will take the data from Mathcad worksheet & will use to extract the required data in the embedded excel file.

3. Use that input variable to extract the diameter & area in excel by using "vlookup" or "hlookup" depending upon your dataset & your preference. (I have used "vlookup" to extract the values).

4. Use output variable to get the extracted value from excel into the Mathcad worksheet.

I have used just the numerical values for the sample file. You can also use this method with units attached to the values so that you can get the real benefit of using Mathcad. Otherwise the same thing can be done in MS excel also.

8-Gravel
September 7, 2016

Thank you very much for all of your answers. Very helpful community as always.

1-Visitor
December 20, 2016

You can do this is excel, first create a list of data pairs in the spreadsheet eg. in cells A1:B3

Circular     1

Square     2

Oval     3

Select another cell, say D1, then choose DATA,, and Data Validation from the excel menu bar - choose list (drop down) for type and then select a data range A1:A3

the cell will then show a drop down list fro you to choose from. Next in cell E1 enter =VLOOKUP(D1,A1:B3,2,FALSE)  as a formula . This will result in the numbers 1, 2 or 3 appearing depending on your choice in D1.

Now in mathcad add an output variable to the excel component and assign it to cell D1.

If you shrink the excel sheet to just show cell D1 then You can now choose from a drop down menu item and the result is the corresponding value.

I had to do this when converting from mathcad 14 to prime 3 as prime does not support web controls (eg pull down  menus)