Hello

I’m working on a GhPython Script which uses an external API

The function I’m using is asking for a parameter in the form of Array[str]. How do I define a variable with this type?

Here is the Runtime Error:

*Runtime error (ArgumentTypeException): expected Array[str], got list*

Here is the Help on the function i’m using:

*Help on method-descriptor ModalParticipatingMassRatios*

*ModalParticipatingMassRatios(…)*

*ModalParticipatingMassRatios(self: cAnalysisResults, NumberResults: int, LoadCase: Array[str], StepType: Array[str], StepNum: Array[float], Period: Array[float], UX: Array[float], UY: Array[float], UZ: Array[float], SumUX: Array[float], SumUY: Array[float], SumUZ: Array[float], RX: Array[float], RY: Array[float], RZ: Array[float], SumRX: Array[float], SumRY: Array[float], SumRZ: Array[float]) → (int, int, Array[str], Array[str], Array[float], Array[float], Array[float], Array[float], Array[float], Array[float], Array[float], Array[float], Array[float], Array[float], Array[float], Array[float], Array[float], Array[float])*

And here is how I’m defining the variables at the moment:

*NumberResults = 0
LoadCase = []
StepType = []
StepNum = []
Period = []*

etc…

Here is how the function is called(this line produces the Runtime error that i’m trying to solve)

*ret = ETABSmodel.Results.ModalParticipatingMassRatios(NumberResults, LoadCase, StepType, StepNum, Period, UX, UY, UZ, SumUX, SumUY, SumUZ, RX, RY, RZ, SumRX, SumRY, SumRZ)*

And i’ve attached the .gh file

ETABStest.gh (4.3 KB)

Thanks in advance