-
Type
geometry = os.Geometry
and
then press Return.
This defines the geometry variable as the Geometry group of
methods in OpenSTAAD.
-
Type
geometry._FlagAsMethod("GetNodeCount")
and then press
Return.
This is required to correctly identify the
OpenSTAAD methods as such in Python.
Note: This approach is required for
this first time you use a method in a python program using OpenSTAAD method. It is not required for each
time that method is re-used within the same code.
-
Type
geometry._FlagAsMethod("GetMemberCount")
and then press
Return.
This is required to correctly identify the
OpenSTAAD methods as such in Python.
Note: This
approach is required for this first time you use a method in a python
program using OpenSTAAD method. It is not
required for each time that method is re-used within the same
code.
Your program at this point should
look
like:from comtypes import automation
from comtypes import client
import ctypes
os = client.GetActiveObject("StaadPro.OpenSTAAD")
geometry = os.Geometry
geometry._FlagAsMethod("GetNodeCount")
geometry._FlagAsMethod("GetMemberCount")