Skip to main content
1-Visitor
February 9, 2016
Question

Plz help me with condition and exporting to excel

  • February 9, 2016
  • 5 replies
  • 10227 views

Hey, i could manage the automatic calculation of a routine for all load cases. But i would need help with the condition which should apply for all calculated cases. THe Reult NOK OK should the given nexto the calculated routine (load case).

After that i want to make a writeexcel to transfer it into Excel.

How can i say in readexcel which columns on which sheet i want to import.

I have so far this file

THx guys 😃

5 replies

25-Diamond I
February 9, 2016

I am confused - is this a follow up to this tread ->‌ Using Excel Database in MathCAD ?

At least the Excel and the Mathcad sheet you posted look like the sheets I had posted there.

How can i say in readexcel which columns on which sheet i want to import.

Concerning the rest of your question - could it be that you are looking for something like this:

WE

1-Visitor
February 9, 2016

A sorry it should be only an example.

Up to now it is not working properly. I could manage the calculation of load cases but the comparison between the maximum allowable value and the actual value is not working. I think its only a failure in the last few stuff.

Here are my 2 files:

A and i need to save the mathcad File after every operation so i then have one File for every load case (Path for saving should be given in the Routine).

The Name should be the load case given in the vector of the Mathcad File

And is it possible to integrate a Button for start Calculation??

Big THx =)))

1-Visitor
February 9, 2016

and one other thing. If im going to import a big Array from Excel and there are empty cells in excel. The Matrix for calculating the LOad Case Results contains "NaNs"

Now is it possible to exclude this cases? Because its not working then when calculating a load case with NaN. So i need to delete the NaN values in the Matrix

25-Diamond I
February 10, 2016

Not sure whats going on here.

All I see is:

1-Visitor
February 10, 2016

i was thinking i can save the calculation with the values for the Calculation?

example:

after saving step i have the result for the variable. I can place the formula after the result and i have a calculation for every load stepexample

3 = Fxp

Condition

Fxp < Fzul x pzul    Conition: true

just placing the Formula how i calculated the result value as example.

1-Visitor
February 10, 2016

Hmm jea i need for further analysis and reporting The Mathcad File with the inserted values for i because i need to do a documentation and for that i can insert a picture with the Formula so that i have a Calculating Report for every Loadcase. And For that i need the real values wich leads to the result and Parameters.

Coz of the needed Calculationreport for every Loadcase. Hmm

Hmm but thx for the help so far. Maybe you know if there is a possibility or a command in mathcad to perform a saving process.

Hmm should i open a new Question regarding saving process while performing a Loop ?

Yea The Name of the saved file should be The column with the load Case for example Load Case 1, insert i=1, and save the File with the Name "1" or whatever there is standing in the column.

Important is the Value for the Result as number for every loadcase

25-Diamond I
February 10, 2016

Hmm should i open a new Question regarding saving process while performing a Loop ?

Maybe worth a try.

1-Visitor
February 10, 2016

ok thx. Do you know such a command?

1-Visitor
February 10, 2016

One last Question:

How can i add this Calculation for every Load step:


a1 ...Parameter a in load case 1

a2... Parameter in load step 2

If a1=1 perform Calculation Case 1

If a1=2 perform Calculation Case 2

If a1=3 perform Calculation Case 3

If a1=4 perform Calculation Case 4

for every step until end of loadcases and show me the resulting vector to export in excel?

Would be great if you can help me one last time with the programcode

I also made it now much easier and efficienter =))

25-Diamond I
February 11, 2016

The attached file should help, I hope.

But I am absolutely not sure, if my crystal ball correctly told me what you really need.

WE

1-Visitor
February 11, 2016

Best thx thats what i need depending on a value in a certain column performing one of 4 calculations for every load step and checking weather its ok and nok!!!!!!!!