Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Return number of loadcases in CAE model

Hi,

What is the function to return number of loadcases in a CAE model ?

For example, when I want the number of solutions, I just have to write :

Dim Solutions() As CAE.SimSolution = simPart.Simulation.Solutions.ToArray
Dim Sol_number As Integer = Solutions.Length

When I try to do the same for loadcases, the command below does not work (because of " ToArray") :

Dim Loadcases() As CAE.BaseLoadcase = Sim_result.GetLoadcases.ToArray

 

What is the correct code to write ?

Thanks,

Best Regards,

Baptiste ALLAFORT

1 REPLY
Solution
Solution
Accepted by topic author ballafort
‎03-10-2016 11:25 AM

Re: Return number of loadcases in CAE model

.GetLoadCases returns an array, no need to convert it to an array. Try the following:

 

Dim Loadcases() As CAE.BaseLoadcase = Sim_result.GetLoadcases
'number of loadcases = Loadcases.Length