Cancel
Showing results for 
Search instead for 
Did you mean: 

Return number of loadcases in CAE model

Pioneer
Pioneer

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

Re: Return number of loadcases in CAE model

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

.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