Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
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
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?
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.
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.
In other words how can I have an "Excel Component with their respective input and output information" saved and stored and applicable to any new calculation sheet that I decide to open. Lets say, even without having this "excel component" inserted in the calculation sheet itself but saved in the Mathcad system. Also how can you assign to every variable from 1 to 100 for example (in this case every sequential bar diameter) for large table an automatically assign the bar diameter sequentially without having for me to do it manually one by one like in this screen shot provided in the "output" region of the excel component.
Juan,
What I have done with structural steel shapes is to insert the data base as an excel component. By selecting the bar (or shape) size before the excel component, you can pass that input into excel, then use a vlookup to get the properties for that specific shape. Take a look at the template that I use for structural steel design.
I hope that this helps.
Create an area at the top of a new sheet.
Insert an EXCEL component in that area that contains your data, define the variables that put that data into Mathcad.
Collapse the area. (EXCEL component disappears but it's still there.)
Save the sheet as a template.
Now, when you open a new file from that template (New from/My templates/ ) the data is there and ready to use.
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
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:
You can embed an EXCEL table in the spreadsheet, with a little creative addressing, have what you want.
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.
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.
Thank you very much for all of your answers. Very helpful community as always.
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)