×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

MathCad and Databases

MathCad and Databases

MathCad and Databases

(OP)
Could someone please tell me what is the easiset way to use databases with MathCad. I would like to create a database of all the AISC steel shapes and their corresponding design values and be able to creata one variable in my MathCad program that would pull up all the design values. Is this possible? If so, could someone elaborate for me. Thank you.

Val

RE: MathCad and Databases

courtnvm,

I'm not certain if this is the best way, but I've made this work.   

I had the shapes database in a spreadsheet, jost the H-shaped members (W, S, M, HP shapes). The channels, angles and others have a differenct list of properties, so I kept them separate.  This might work  with the whole list, but you'd get some zeros in your table when you're done.  It has a line of text at the top, that includes the column headings, (like A, d, tw etc.)  It also has a column at the left that has the shape neames (W12X26, W8X31 etc.)  I made sure that spreadsheet table has all the X's in upper case to make matdhing easier. Blanks in the spreadsheet table willl shoow up as zeros.  All the text will show up in quote marks.

Into your mathcad worksheet, go to the menus:  
Insert/Data/Table.  This will give you a table that looks like a spreadsheet right in yoru mathcad worksheet. This table will be on the "back side" of a variable definition with an empty placeholder in front.

Click on the place holdere and type in a variable name, something like beamtable.  Then, open your spreadsheet in a different window.  Go to your table and highlight the whole thing, including the column headings and the beam names on the lift.  Type in Ctl-C to copy the wholwe thing to the clipboard.

Bo back to your mathcad,  and click on the upper left cell in the spreadsheet, so the entry is highlighted (it shows up in reversee highlighting.  Type Ctl-V to paste the clipboard at the highlighted location.  This should give you a table full of numbers and some text.   Now the variable beamtable has the value(s( in this table.  


To use this table in calculations, do the following:

define a variable like Shape:= and give it a value like "W8X24",  Make sure the X is in uppercase to get a match.

Then insert a small program:

sectionproperties(beamtable,Shape):=
for i= 1..351
   for j= 1..32
       if beamtable(i,1)==Shape  then  beamproperties(j <- beamtable (i,j)
beamproperties

I cannot maake this look exactly like the programming in Mathcad, but all subscripts are typed preceded by [, <- is the programming assignment arrow (see programming toolbar, if-then statements typed using the programming toolbar, and the == is the bold = on the boolean toolbar.

Shape is now a vriable (array) with the value = one line from beamtable, eg.   "W8X24",7.08, 7.93, 0.245, etc etc)

To extract them, use the indexes from that variable, for example, A:= shapeproperties(2)*in^2, Ixx := shapeproperties(17), etc etc.

Now you have looked up all the section properteis for the variable Shape.   You can use them in calculations.


regards,


chichuck



RE: MathCad and Databases

(OP)
chichuck,

thanks for the reply. I am having a problem with the programming part. Should beamproperties variable in the program be sectionproperties. I apologize if I am misunderstanding how to write the program in MathCad. It has been a while since I have programmed.

Thank you,
Val

RE: MathCad and Databases

Courtnvm,


In my worksheet it is not.  beamproperties is a local variable in the program.  If I remember from my fortran class in school, a it should work the same way if your local variable is also shectionproperties.  

I tried that change in my worksheet, and it works properly whether you call the local variable beamproperties or sectionproperties.  

regards,


chichuck

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close