Member
Geometry
The members themselves — add, delete, renumber, and query incidences between two nodes. Loads on members live in Load › Member Loads; section and material in Section & Material.
35 functions
Create
AddBeam
Adds a beam/member with specified nodes in the current model
This function adds a beam/member with the specified start and end nodes to the current model and returns the member number automatically assigned.
Parameters
- nNodeA: Number ID of the STARTING end node (nodeA).
- nNodeB: Number ID of the ENDING end node (nodeB).
Return values
- <Val>: Member number ID assigned to this created member.
- -1: Unable to add member.
- -2001: Cannot find Node < nNodeA or nNodeB >.
Example
# Example usage of AddBeam
# member_id = openstaad.Geometry.AddBeam(nNodeA, nNodeB)
from openstaad import ops
# Instanciar el módulo Geometry
s = ops.connect()
# Ejecutar la función desde el módulo geometry
member_id = s.AddBeam(nNodeA, nNodeB)
AddMultipleBeams
Description
Adds multiple the beams.
Parameters
incidences(list): incidences.
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.AddMultipleBeams([1, 2])
print(result)
CreateBeam
Description
Creates the beam.
Parameters
nBeamNo(int): n beam no.nNodeStart(int): n node start.nNodeEnd(int): n node end.
Returns
None: This function does not return a value.
Example
from openstaad import ops
s = ops.connect()
s.CreateBeam(1, 1, 1)
CreateMultipleBeams
Description
Creates multiple the beams.
Parameters
beam_ids(list): beam ids.beam_incidences(list): beam incidences.
Returns
value: See the official OpenSTAAD API reference for this method's exact return semantics.
Example
from openstaad import ops
s = ops.connect()
result = s.CreateMultipleBeams([1, 2], [1, 2])
print(result)
Get
GetBeamLength
Description Get the length of a beam identified by its number.
Parameters
- beam (int): Beam number.
Returns float: Length of the beam, in model units, rounded to 3 decimals.
Example To use this function see the following example:
from openstaad import ops
# Connect to the running STAAD.Pro session
s = ops.connect()
#Execute the function from geometry module
length = s.GetBeamLength(1)
print(length)
GetBeamList
Description Retrieve a list of all beam (member) numbers.
Parameters
- None
Returns list: List of beam numbers.
Example To use this function see the following example:
from openstaad import ops
# Connect to the running STAAD.Pro session
s = ops.connect()
#Execute the function from geometry module
beams = s.GetBeamList()
print(beams)
GetBeamsInView
Description
Returns the beams in view.
Parameters
nBeamList(list): n beam list.
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.GetBeamsInView([1, 2])
print(result)
GetIntersectBeamsCount
Returns the number of new beams that will be created if the specified list of beams are intersected. This method can be used to get the count of beams that can be used to define the size of the output array while using the API OSGeometryUI::IntersectBeams.
Parameters
- BeamNosArray: Array of beam numbers. If the array is either null or empty, then all members in the current model will be considered. (Long)
- dTolerance: Tolerance to be used for finding beam intersection. Should not be a negative value. Unit: meter for Metric and inch for English in Base Unit (float/double).
Return values
- Returns the number of beams that satisfy the criteria.
Example
from openstaad import ops
# Instanciar el módulo Geometry
s = ops.connect()
# Obtener el número de nuevos beams que se crearían al intersectar los beams 1, 2 y 3 con una tolerancia de 0.01
count = s.GetIntersectBeamsCount([1, 2, 3], 0.01)
GetLastBeamNo
Description Get the number of the last beam in the model.
Parameters
- None
Returns int: Last beam number.
Example To use this function see the following example:
from openstaad import ops
# Connect to the running STAAD.Pro session
s = ops.connect()
#Execute the function from geometry module
last_beam = s.GetLastBeamNo()
print(last_beam)
GetMemberCount
Description Get the number of members (beams) in the model.
Parameters
- None
Returns int: Number of members.
Example To use this function see the following example:
from openstaad import ops
# Connect to the running STAAD.Pro session
s = ops.connect()
#Execute the function from geometry module
count = s.GetMemberCount()
print(count)
GetMemberDesignParameters
Description
Returns the member design parameters.
Parameters
design_ref_id(int): design ref id.member_no(int): member no.
Returns
list: A list of values.
Example
from openstaad import ops
s = ops.connect()
result = s.GetMemberDesignParameters(1, 1)
print(result)
GetMemberGlobalOffSet
Description
Returns the member global off set.
Parameters
beam_id(int): beam id.member_offset_position(int): member offset position.
Returns
tuple: A tuple of float values, one per output slot.
Example
from openstaad import ops
s = ops.connect()
result = s.GetMemberGlobalOffSet(1, 1)
print(result)
GetMemberIncidence
Description Get the start and end node numbers for a given beam.
Parameters
- beam (int): Beam number.
Returns tuple: Start and end node numbers as a tuple (start, end).
Example To use this function see the following example:
from openstaad import ops
# Connect to the running STAAD.Pro session
s = ops.connect()
#Execute the function from geometry module
start_node, end_node = s.GetMemberIncidence(1)
print(start_node,end_node)
GetMemberIncidence_CIS2
Description
Returns the member incidence CIS 2.
Parameters
memberId(int): member Id.
Returns
tuple: A tuple of (str, int, int).
Example
from openstaad import ops
s = ops.connect()
result = s.GetMemberIncidence_CIS2(1)
print(result)
GetMemberLocalOffSet
Description
Returns the member local off set.
Parameters
beam_id(int): beam id.member_offset_position(int): member offset position.
Returns
tuple: A tuple of float values, one per output slot.
Example
from openstaad import ops
s = ops.connect()
result = s.GetMemberLocalOffSet(1, 1)
print(result)
GetMemberUniqueID
Description
Returns the member unique ID.
Parameters
memberNo(int): member 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.GetMemberUniqueID(1)
print(result)
GetNoOfBeamsInView
Description
Returns the number of the beams in view.
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.GetNoOfBeamsInView()
print(result)
GetNoOfSelectedBeams
Description Get the number of selected beams in the model.
Parameters
- None
Returns int: Number of selected beams.
Example To use this function see the following example:
from openstaad import ops
# Connect to the running STAAD.Pro session
s = ops.connect()
#Execute the function from geometry module
count = s.GetNoOfSelectedBeams()
print(count)
GetPMemberCount
Description Get the count of PMembers in the model.
Parameters
- None
Returns int: Count of PMembers.
Example To use this function see the following example:
from openstaad import ops
# Connect to the running STAAD.Pro session
s = ops.connect()
#Execute the function from geometry module
p_member_count = s.GetPMemberCount()
print(p_member_count)
GetSelectedBeams
Description Retrieve a list of currently selected beams.
Parameters
- None
Returns list: List of selected node numbers.
Example To use this function see the following example:
from openstaad import ops
# Connect to the running STAAD.Pro session
s = ops.connect()
#Execute the function from geometry module
selected_beams = s.GetSelectedBeams()
Set/Assign
SetMemberUniqueID
Description
Sets the member unique ID.
Parameters
beamNo(int): beam no.uniqueID(str): unique ID.
Returns
None: This function does not return a value.
Example
from openstaad import ops
s = ops.connect()
s.SetMemberUniqueID(1, "value")
Delete
ClearMemberSelection
Description Clear the current selection of members in the model.
Parameters
- None
Returns None
Example To use this function see the following example:
from openstaad import ops
# Connect to the running STAAD.Pro session
s = ops.connect()
#Execute the function from geometry module
s.ClearMemberSelection()
DeleteBeam
Description
Deletes the beam.
Parameters
BeamNo(int): beam no.
Returns
None: This function does not return a value.
Example
from openstaad import ops
s = ops.connect()
s.DeleteBeam(1)
Select
SelectBeam
Description
Selects the beam.
Parameters
beamID(int): beam ID.
Returns
bool: True if the call succeeded, False otherwise.
Example
from openstaad import ops
s = ops.connect()
result = s.SelectBeam(1)
print(result)
SelectEntitiesConnectedToMember
Description
Selects the entities connected to member.
Parameters
entityType(int): entity type.memberNo(int): member no.
Returns
None: This function does not return a value.
Example
from openstaad import ops
s = ops.connect()
s.SelectEntitiesConnectedToMember(1, 1)
SelectMembersParallelTo
Description
Selects the members parallel to.
Parameters
bstrAxis(str): bstr axis.
Returns
None: This function does not return a value.
Example
from openstaad import ops
s = ops.connect()
s.SelectMembersParallelTo("value")
SelectMultipleBeams
Description Select multiple beams based on a provided list of beam numbers.
Parameters
- lista (list): A list of beam numbers to select.
Returns None
Example To use this function see the following example:
from openstaad import ops
# Connect to the running STAAD.Pro session
s = ops.connect()
#Execute the function from geometry module
s.SelectMultipleBeams([1, 3, 4])
Transform
IntersectBeams
Description
Computes the intersection of the beams.
Parameters
method(int): method.beamList(list): beam list.tolerance(float): tolerance.
Returns
list: A list of integers.
Example
from openstaad import ops
s = ops.connect()
result = s.IntersectBeams(1, [1, 2], 1.0)
print(result)
MergeBeams
Description
Merges the beams.
Parameters
beamList(list): beam list.newId(int): new Id.property_id(int): property id.beta_angle(float): beta angle.material_name(str): material name.
Returns
bool: True if the call succeeded, False otherwise.
Example
from openstaad import ops
s = ops.connect()
result = s.MergeBeams([1, 2], 1, 1, 1.0, "value")
print(result)
RenumberBeam
Description
Renumbers the beam.
Parameters
oldBeamNo(int): old beam no.newBeamNo(int): new beam no.
Returns
bool: True if the call succeeded, False otherwise.
Example
from openstaad import ops
s = ops.connect()
result = s.RenumberBeam(1, 1)
print(result)
SplitBeam
Description
Splits the beam.
Parameters
beamNo(int): beam no.nodes(int): nodes.distToNodes(list): dist to nodes.
Returns
None: This function does not return a value.
Example
from openstaad import ops
s = ops.connect()
s.SplitBeam(1, 1, [1, 2])
SplitBeamInEqlParts
Description
Splits the beam in eql parts.
Parameters
nBeamNo(int): n beam no.nParts(int): n parts.
Returns
None: This function does not return a value.
Example
from openstaad import ops
s = ops.connect()
s.SplitBeamInEqlParts(1, 1)
Execute
DoTranslationalRepeat
Description
Performs the translational repeat.
Parameters
link_bays(bool): link bays.open_base(bool): open base.axis_dir(int): axis dir.spacing_list(list): spacing list.no_of_bays(int): no of bays.renumber_bays(bool): renumber bays.renumber_list(list): renumber list.geometry_only_flag(bool): geometry only flag.
Returns
bool: True if the call succeeded, False otherwise.
Example
from openstaad import ops
s = ops.connect()
result = s.DoTranslationalRepeat(True, True, 1, [1, 2], 1, True, [1, 2], True)
print(result)
Is
IsBeam
Description
Checks whether beam.
Parameters
beam_no(int): beam no.tol_angle(float): tol angle.
Returns
bool: True if the call succeeded, False otherwise.
Example
from openstaad import ops
s = ops.connect()
result = s.IsBeam(1, 1.0)
print(result)
IsColumn
Description
Checks whether column.
Parameters
column_no(int): column no.tol_angle(float): tol angle.
Returns
bool: True if the call succeeded, False otherwise.
Example
from openstaad import ops
s = ops.connect()
result = s.IsColumn(1, 1.0)
print(result)