Section/Property

Query & Attributes

Query section properties — area, moments of inertia, dimensions — for any assigned or table section.

22 functions

Get

GetAssignedAttributeByIndex

Description

Returns the assigned attribute by index.

Parameters

  • attribute_index (int): attribute index.

Returns

tuple: A tuple of (str, str).

Example

from openstaad import ops

s = ops.connect()
result = s.GetAssignedAttributeByIndex(1)
print(result)

GetAssignedAttributeCount

Description

Returns the assigned attribute count.

Parameters

  • member_id (int): member id.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.GetAssignedAttributeCount(1)
print(result)

GetCentroidLocationForSection

Description

Returns the centroid location for section.

Parameters

  • property_id (int): property id.

Returns

tuple: A tuple of (float, float).

Example

from openstaad import ops

s = ops.connect()
result = s.GetCentroidLocationForSection(1)
print(result)

GetCountofSectionPropertyValuesEx

Description

Returns the countof section property values ex.

Parameters

None.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.GetCountofSectionPropertyValuesEx()
print(result)

GetMaxSectionDisplacement

Description

Returns the max section displacement.

Parameters

  • memberNo (int): member no.
  • dir (str): dir.
  • loadCaseNo (int): load case no.

Returns

tuple: A tuple of (float, float).

Example

from openstaad import ops

s = ops.connect()
result = s.GetMaxSectionDisplacement(1, "value", 1)
print(result)

GetPID

Description

Returns the PID.

Parameters

  • EntityNo (int): entity no.
  • EntityType (int): entity type.

Returns

int: An integer value returned by STAAD.Pro for this call.

Example

from openstaad import ops

s = ops.connect()
result = s.GetPID(1, 1)
print(result)

GetPropertyUniqueID

Description

Returns the property unique ID.

Parameters

  • property_unique_id (int): property unique id.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.GetPropertyUniqueID(1)
print(result)

GetRecordForSection

Description

Returns the record for section.

Parameters

  • country_code (int): country code.
  • section_name (str): section name.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.GetRecordForSection(1, "value")
print(result)

GetSectionPropertyCount

Description

Returns the section property count.

Parameters

None.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.GetSectionPropertyCount()
print(result)

GetSectionPropertyCountry

Description

Returns the section property country.

Parameters

  • sec_ref_no (int): sec ref no.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.GetSectionPropertyCountry(1)
print(result)

GetSectionPropertyList

Description

Returns the section property list.

Parameters

None.

Returns

list: A list of integers.

Example

from openstaad import ops

s = ops.connect()
result = s.GetSectionPropertyList()
print(result)

GetSectionPropertyName

Description

Returns the section property name.

Parameters

  • sctn_prop_id (int): sctn prop id.

Returns

str: A string value returned by STAAD.Pro for this call.

Example

from openstaad import ops

s = ops.connect()
result = s.GetSectionPropertyName(1)
print(result)

GetSectionPropertyType

Description

Returns the section property type.

Parameters

  • sec_ref_no (int): sec ref no.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.GetSectionPropertyType(1)
print(result)

GetSectionPropertyValues

Description

Returns the 10 basic section property values for an assigned profile type.

Parameters

  • prof_type (int): Assigned profile type code:

    Profile typeValue
    AssignAngle0
    AssignDoubleAngle1
    AssignBeam2
    AssignColumn3
    AssignChannel4

Returns

tuple: A 10-element tuple of floats, in this order: (width, depth, ax, ay, az, ix, iy, iz, tf, tw).

#ValueMeaning
1widthSection width (WID).
2depthSection depth (DEP).
3axCross-sectional area (Ax).
4ayShear area in local y axis; if zero, shear deformation is ignored in analysis (Ay).
5azShear area in local z axis; if zero, shear deformation is ignored in analysis (Az).
6ixMoment of inertia about local z axis (Ix).
7iyMoment of inertia about local y axis (Iy).
8izTorsional constant (Iz).
9tfTop flange thickness (Tf).
10twWeb thickness (Tw).

Example

from openstaad import ops

s = ops.connect()
width, depth, ax, ay, az, ix, iy, iz, tf, tw = s.GetSectionPropertyValues(2)
print(width, depth, ax)

GetSectionPropertyValuesEx

Description

Returns the section property values ex.

Parameters

  • section_property_id (int): section property id.

Returns

tuple: A tuple of (int, list[float]).

Example

from openstaad import ops

s = ops.connect()
result = s.GetSectionPropertyValuesEx(1)
print(result)

GetSectionTableNo

Description

Returns the section table no.

Parameters

  • beam_id (int): beam id.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.GetSectionTableNo(1)
print(result)

GetShapeCode

Description

Returns the shape code.

Parameters

  • country_code (int): country code.
  • section_name (str): section name.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.GetShapeCode(1, "value")
print(result)

Set/Assign

SetPID

Description

Sets the PID.

Parameters

  • EntityNo (int): entity no.
  • EntityType (int): entity type.
  • PropertyID (int): property ID.

Returns

None: This function does not return a value.

Example

from openstaad import ops

s = ops.connect()
s.SetPID(1, 1, 1)

SetPropertyUniqueID

Description

Sets the property unique ID.

Parameters

  • property_number (int): property number.
  • property_unique_id (str): property unique id.

Returns

None: This function does not return a value.

Example

from openstaad import ops

s = ops.connect()
s.SetPropertyUniqueID(1, "value")

UpdatePropertiesToDesignSection

Description

Updates the properties to design section.

Parameters

None.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.UpdatePropertiesToDesignSection()
print(result)

Delete

DeleteProperty

Description

Deletes the property.

Parameters

  • property_id (int): property id.

Returns

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

Example

from openstaad import ops

s = ops.connect()
result = s.DeleteProperty(1)
print(result)

RemoveAttribute

Description

Removes the attribute.

Parameters

  • attribute_name (str): attribute name.
  • str_value (str): str value.
  • member_ids (list): member ids.

Returns

bool: True if the call succeeded, False otherwise.

Example

from openstaad import ops

s = ops.connect()
result = s.RemoveAttribute("value", "value", [1, 2])
print(result)