fracture_point
Structural
- Mar 7, 2019
- 58
I'm trying to write some code in Python that draws a slab in ETABS. However, API documentation is scarce for Python for this method. An example is given for VB:
I don't quite know how to manipulate this for Python. The C# documentation shows:
Should I be passing arrays of x,y,z coordinates? Does anyone know how to create the equivalent code in Python?
Thanks!
Code:
'add area object by coordinates
ReDim x(5)
ReDim y(5)
ReDim z(5)
x(0) = 50: y(0) = 0
x(1) = 100: y(1) = 0
x(2) = 150: y(2) = 40
x(3) = 100: y(3) = 80
x(4) = 50: y(4) = 80
x(5) = 0: y(5) = 40
ret = SapModel.AreaObj.AddByCoord(6, x, y, z, Name)
I don't quite know how to manipulate this for Python. The C# documentation shows:
Code:
int AddByCoord(
int NumberPoints,
ref double[] X,
ref double[] Y,
ref double[] Z,
ref string Name,
string PropName = "Default",
string UserName = "",
string CSys = "Global"
)
Should I be passing arrays of x,y,z coordinates? Does anyone know how to create the equivalent code in Python?
Thanks!