pytabs package

Subpackages

Submodules

pytabs.analyse module

class pytabs.analyse.Analyse(sap_model: None)[source]

Bases: object

Analyse interface

pytabs.analysis_results module

class pytabs.analysis_results.AnalysisResults(sap_model: None)[source]

Bases: object

AnalysisResults interface

base_react() BaseReact[source]

Reports the structure total base reactions.

Returns:

total base reactions analysis results

Return type:

BaseReact

base_react_with_centroid() BaseReactWithCentroid[source]

Reports the structure total base reactions and includes information on the centroid of the translational reaction forces.

Returns:

Base reaction with centriod analysis results

Return type:

BaseReactWithCentroid

buckling_factor() BucklingFactor[source]

Reports buckling factors obtained from buckling load cases.

Returns:

Buckling factors analysis results

Return type:

BucklingFactor

joint_displacement(name: str, item_type_element: None) JointDisplacement[source]

Reports the joint displacements for the specified point elements. The displacements reported by this function are relative displacements.

Parameters:
  • name (str) – The name of an existing point object, point element, or group of objects depending on the value of the ItemTypeElm item

  • item_type_element (etabs.eItemTypeElm) – one of the following items in the eItemTypeElm enumeration. ObjectElm - the point element corresponding to the point object specified by the name Element - the point element specified by name GroupElm - all point elements directly or indirectly specified in the group specified by name SelectionElm - all point elements directly or indirectly selected and name is ignored

Returns:

Joint Displacement analysis results

Return type:

JointDisplacement

modal_load_participation_ratios() ModalLoadParticipationRatios[source]

Reports the modal load participation ratios for each selected modal analysis case

Returns:

Modal load participation ratios analysis results

Return type:

ModalLoadParticipationRatios

modal_participating_mass_ratios() ModalParticipatingMassRatios[source]

Reports the modal participating mass ratios for each mode of each selected modal analysis case.

Returns:

Modal participating mass ratios analysis results

Return type:

ModalParticipatingMassRatios

modal_participation_factors() ModalParticipationFactors[source]

Reports the modal participation factors for each mode of each selected modal analysis case.

Returns:

Modal participation factors analysis results

Return type:

ModalParticipationFactors

modal_period() ModalPeriod[source]

Reports the modal period, cyclic frequency, circular frequency and eigenvalue for each selected modal load case.

Returns:

Modal period analysis results

Return type:

ModalPeriod

pier_force() PierForce[source]

Retrieves pier forces for any defined pier objects in the model.

Returns:

Pier force analysis results

Return type:

PierForce

section_cut_analysis() SectionCutAnalysis[source]

Reports the section cut force for sections cuts that are specified to have an analysis (force_1, force_2, force_3, moment_1, moment_2, moment_3) result type.

Returns:

section cut analysis results

Return type:

SectionCutAnalysis

section_cut_design() SectionCutDesign[source]

Report the section cut force for sections cuts that are specified to have a design (axial force, shear force 2, shear force 3, torsion, moment 2, moment 3) result type.

Returns:

Section cut design results

Return type:

SectionCutDesign

spandrel_force() SpandrelForce[source]

Retrieves spandrel forces for any defined spandrel objects in the model.

Returns:

Spandrel force analysis results

Return type:

SpandrelForce

story_drifts() StoryDrift[source]

Reports the story drifts.

Returns:

Story drifts analysis results

Return type:

StoryDrift

pytabs.analysis_results_setup module

class pytabs.analysis_results_setup.AnalysisResultsSetup(sap_model: None)[source]

Bases: object

AnalysisResultsSetup interface

deselect_all_cases_combos_for_output() None[source]

Deselects all load cases and response combinations for output.

get_case_selected_for_output(case_name: str) bool[source]

Checks if a load case is selected for output.

Parameters:

case_name (str) – name of an existing load case

Returns:

True if the Case selected for output, False otherwise

Return type:

bool

get_combo_selected_for_output(combo_name: str) bool[source]

Checks if a load combination is selected for output.

Parameters:

combo_name (str) – name of an existing combination

Returns:

True if the Combination selected for output, False otherwise

Return type:

bool

get_base_reaction_location() tuple[float, float, float][source]

Retrieves the global coordinates of the location at which the base reactions are reported.

Returns:

global coordinate of 3d point where base reactions are reported (gx, gy, gz)

Return type:

tuple[float, float, float]

get_buckling_mode_setup() tuple[int, int, bool][source]

Retrieves the mode buckling range for output.

Returns:

return[0] - first buckling mode, return[1] - last buckling mode, return[2] - all buckling modes

Return type:

tuple[int, int, bool]

get_direct_history_setup() eResultsSetupStepOutOption[source]

Retrieves the output option for direct history results.

Returns:

one of step out options (envelopes, step-by-step or last-step)

Return type:

eResultsSetupStepOutOption

get_modal_history_setup() eResultsSetupStepOutOption[source]

Retrieves the output option for modal history results.

Returns:

one of step out options (envelopes, step-by-step or last-step)

Return type:

eResultsSetupStepOutOption

get_mode_shape_setup() tuple[bool, int, int][source]

Retrieves the mode shape range for output.

Returns:

return[0] - all modes, return[1] - first mode, return[2] - last mode

Return type:

tuple[bool, int, int]

get_combination_setup() eResultsSetupComboOutOption[source]

Retrieves the combination option setup.

Returns:

one of combo options (envelopes or multiple)

Return type:

eResultsSetupComboOutOption

get_nonlinear_setup() eResultsSetupStepOutOption[source]

Retrieves the non-linear static results option.

Returns:

one of step out options (envelopes, step-by-step or last-step)

Return type:

eResultsSetupStepOutOption

set_case_selected_for_output(case_name: str, select_state: bool = True) None[source]

Sets a load case selected for output flag.

Parameters:
  • case_name (str) – name of existing load case

  • select_state (bool, optional) – select case for output, defaults to True

set_combo_selected_for_output(combo_name: str, select_state: bool = True) None[source]

Sets a combination selected for output flag.

Parameters:
  • combo_name (str) – name of the existing combination

  • select_state (bool, optional) – select combination for output defaults to True

set_base_reaction_location(point: tuple[float, float, float]) None[source]

Sets the global coordinates of the location at which the base reactions are reported.

Parameters:

point (tuple[float, float, float]) – global coordinate of 3d point where base reactions are to be reported (gx, gy, gz)

set_buckling_mode_setup(start_buckling_mode: int, end_buckling_mode: int, all_buckling_modes: bool = False) None[source]

Sets the buckling mode range for output.

Parameters:
  • start_buckling_mode (bool, optional) – first buckling mode number

  • end_buckling_mode (int) – last buckling mode number

  • all_buckling_modes (bool) – all buckling modes, defaults to False

set_direct_history_setup(option: eResultsSetupStepOutOption) None[source]

Sets the direct history results option.

Parameters:

option (eResultsSetupStepOutOption) – one of step out options (envelopes, step-by-step or last-step)

set_modal_history_setup(option: eResultsSetupStepOutOption) None[source]

Sets the modal history results option.

Parameters:

option (eResultsSetupStepOutOption) – one of step out options (envelopes, step-by-step or last-step)

set_mode_shape_setup(start_mode: int, end_mode: int, all_modes: bool = False) None[source]

Sets the mode shape range for output.

Parameters:
  • start_mode (int) – first mode number

  • end_mode (int) – last mode number

  • all_modes (bool, optional) – all modes, defaults to False

set_combination_setup(option: eResultsSetupComboOutOption) None[source]

Sets the non-linear static results option.

Parameters:

option (eResultsSetupComboOutOption) – one of combo options (envelopes or multiple)

set_nonlinear_setup(option: eResultsSetupStepOutOption) None[source]

Sets the non-linear static results option.

Parameters:

option (eResultsSetupStepOutOption) – one of step out options (envelopes, step-by-step or last-step)

pytabs.area_elm module

class pytabs.area_elm.AreaElm(sap_model: None)[source]

Bases: object

AreaElm interface

pytabs.area_obj module

class pytabs.area_obj.AreaObj(sap_model: None)[source]

Bases: object

AreaObj interface

eWallPierRebarLayerType

EtabsModel WallPierRebarLayerType enumeration

eWallSpandrelRebarLayerType

EtabsModel WallSpandrelRebarLayerType enumeration

get_label_from_name(area_name: str) AreaObjectLabelData[source]

Retrieves the label and story for a unique area object name.

Parameters:

area_name (str) – name of the area object

Returns:

label and story of area object name

Return type:

AreaObjectLabelData

get_name_list_on_story(story_name: str) list[str][source]

Retrieves the names of the defined area objects on a given story.

Parameters:

story_name (str) – name of an existing story

Returns:

area object names on existing story

Return type:

list[str]

get_property(area_name: str) str[source]

Retrieves the name of the area property assigned to an area object.

Parameters:

area_name (str) – name of an existing area object

Returns:

name of the area property assigned to the area object

Return type:

str

set_group_assign(name: str, group_name: str, remove: bool = False, item_type: None = None) None[source]

Adds or removes area objects from a specified group.

Parameters:
  • name (str) – name of an existing area object or group depending on the value of item_type

  • group_name (str) – name of an existing group to which the assignment is made

  • remove (bool, optional) – True for add, False for remove, defaults to False

  • item_type (eItemType, optional) – one of eItemType enumeration (Objects : area object specified by name is added/removed from group, Group : all area objects in the group specified by name are added/removed from group, SelectedObjects : all selected area objects are added/removed from group, name is ignored), defaults to eItemType.Objects

get_spring_assignment(area_name: str) str[source]

Retrieves the area object area spring assignment of the defined frame object.

Parameters:

area_name (str) – unique name of an existing area object

Returns:

area object area spring assignment

Return type:

str

set_spring_assignment(area_name: str, area_spring_prop: str, item_type: None = None) None[source]

Assigns an existing area spring property to area objects of the value item_type.

Parameters:
  • area_name (str) – unique name of an existing area object

  • area_spring_prop (str) – name of an existing area spring property

  • item_type (eItemType, optional) – one of eItemType enumeration (Objects : area object specified by name is added/removed from group, Group : all area objects in the group specified by name are added/removed from group, SelectedObjects : all selected area objects are added/removed from group, name is ignored), defaults to eItemType.Objects

pytabs.combo module

class pytabs.combo.Combo(sap_model: None)[source]

Bases: object

Combo interface

eCNameType

EtabsModel CNameType enumeration

get_case_list(name: str) CaseList[source]

Retrieves all load cases and response combinations included in the load combination specified by the Name item.

Parameters:

name (str) – The name of an existing load combination.

Returns:

Load cases and response combinations included

Return type:

CaseList

get_name_list() list[str][source]

Retrieves the names of all defined response combinations.

Returns:

list of combination names

Return type:

list[str]

pytabs.constraint module

class pytabs.constraint.Constraint(sap_model: None)[source]

Bases: object

Constraint interface

eConstraintAxis

EtabsModel ConstraintAxis enumeration

eConstraintType

EtabsModel ConstraintType enumeration

pytabs.database_tables module

class pytabs.database_tables.DatabaseTables(sap_model: None)[source]

Bases: object

DatabaseTables interface

get_all_table_details() list[DbTable][source]
Return type:

list[DbTable]

get_table_details(key) DbTable[source]
Return type:

DbTable

get_table_fields(table_key) list[DbField][source]
Return type:

list[DbField]

get_table_data_array(table: DbTable, edit_mode: bool = False, group_name: str = '', field_key: list[str] = [''])[source]
set_table_data_array_edit(table: DbTable, field_keys: list[str], table_data: list[list]) None[source]
apply_table_edits(log_import: bool = False) DbEditLog[source]
Return type:

DbEditLog

discard_table_edits()[source]

pytabs.diaphragm module

class pytabs.diaphragm.Diaphragm(sap_model: None)[source]

Bases: object

Diaphragm interface

pytabs.enumerations module

class pytabs.enumerations.eGeometryNonlinearityType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

NONE = 0
P_DELTA = 1
P_DELTA_LARGE_DELTA = 2
class pytabs.enumerations.eLoadApplicationControlType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

FULL_LOAD = 0
DISPLACEMENT_CONTROL = 1
QUASI_STATIC = 2
class pytabs.enumerations.eDisplacementControlType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

CONJUGATE = 0
MONITORED = 1
class pytabs.enumerations.eDisplacementMonitorType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

DOF_JOINT = 0
GENERALIZED = 1
class pytabs.enumerations.eMonitoredDisplacementDoF(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

U1 = 0
U2 = 1
U3 = 2
R1 = 3
R2 = 4
R3 = 5
class pytabs.enumerations.eLinearStaticCaseLoadType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

LOAD = 'Load'
ACCELERATION = 'Accel'
class pytabs.enumerations.eNonlinearStaticCaseLoadType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

LOAD = 'Load'
ACCELERATION = 'Accel'
MODE = 'Mode'
class pytabs.enumerations.eStageOperationType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

ADD_STRUCTURE = 1
REMOVE_STRUCTURE = 2
LOAD_NEW = 3
LOAD_ALL = 4
CHANGE_PROPERTY = 5
CHANGE_PROPERTY_MODIFIERS = 6
CHANGE_RELEASES = 7
CHANGE_PROPERTY_AGE = 11
class pytabs.enumerations.eStageObjectType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

GROUP = 'Group'
FRAME = 'Frame'
CABLE = 'Cable'
TENDON = 'Tendon'
AREA = 'Area'
SOLID = 'Solid'
POINT = 'Point'
class pytabs.enumerations.eStageMyType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

LOAD = 'Load'
ACCELERATION = 'Accel'
FRAME = 'Frame'
CABLE = 'Cable'
TENDON = 'Tendon'
AREA = 'Area'
SOLID = 'Solid'
NONE = ''
class pytabs.enumerations.eResultsSetupStepOutOption(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

ENVELOPES = 1
STEP_BY_STEP = 2
LAST_STEP = 3
class pytabs.enumerations.eResultsSetupComboOutOption(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

ENVELOPES = 1
MULTIPLE = 2
class pytabs.enumerations.eFrameDesignProcedure(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

PROGRAM = 0
STEEL_FRAME = 1
CONCRETE_FRAME = 2
COMPOSITE_BEAM = 3
STEEL_JOIST = 4
NULL = 7
COMPOSITE_COLUMN = 13
class pytabs.enumerations.eSelectObjectType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

POINT = 1
FRAME = 2
CABLE = 3
TENDON = 4
AREA = 5
SOLID = 6
class pytabs.enumerations.ePointSpringStiffnessOption(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

SOIL_OR_FOOTING = 2
class pytabs.enumerations.eSpringNonlinearOption(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

LINEAR = 0
COMPRESSION_ONLY = 1
TENSION_ONLY = 2
class pytabs.enumerations.eLinkDof(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

U1 = 1
U2 = 2
U3 = 3
R1 = 4
R2 = 5
R3 = 6
class pytabs.enumerations.eLinkHysteresisType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

KINEMATIC = 1
TAKEDA = 2
PIVOT = 3
class pytabs.enumerations.eTableImportableType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

NOT_IMPORTABLE = 0
NOT_INTERACTIVE = 1
INTERACTIVE_IF_UNLOCKED = 2
INTERACTIVE_ALWAYS = 3

pytabs.error_handle module

pytabs.error_handle.handle(ret: int) None[source]

Handles ETABS API return.

Parameters:

ret (int) – return integer from ETABS API function

Raises:

EtabsError – general ETABS API error if return int is != 0

pytabs.etabs_config module

class pytabs.etabs_config.Mock(*args, **kwargs)[source]

Bases: object

pytabs.frame_obj module

class pytabs.frame_obj.FrameObj(sap_model: None)[source]

Bases: object

FrameObj interface

eHingeLocationType

EtabsModel HingeLocationType enumeration

add_by_coord(xi_coordinate: float, yi_coordinate: float, zi_coordinate: float, xj_coordinate: float, yj_coordinate: float, zj_coordinate: float, prop_name: str = 'Default', user_name: str = '', coordinate_sys: str = 'Global') str[source]

Adds a new frame object whose end points are at the specific coordinates.

Parameters:
  • xi_coordinate (float) – the X coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item

  • yi_coordinate (float) – the Y coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item

  • zi_coordinate (float) – the Z coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item

  • xj_coordinate (float) – the X coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item

  • yj_coordinate (float) – the Y coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item

  • zj_coordinate (float) – the Z coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item

  • prop_name (str, optional) – if Default ETABS assigns a default section property to the frame object, if None no section property is assigned to the frame object, otherwise use the name of a defined frame section property

  • user_name (str, optional) – if a user_name is specified and that name is already used for another frame, cable or tendon object the program ignores the username, if no username is specified the program assigns a default name to the frame object

  • coordinate_sys (str, optional) – the name of the coordinate system in which the frame object end point coordinates are defined

Returns:

the name ETABS ultimately assigns for the frame object

Return type:

str

add_by_point(point_i: str, point_j: str, prop_name: str = 'Default', user_name: str = '') str[source]

Adds a new frame object whose end points are specified by name.

Parameters:
  • point_i (str) – the name of a defined point object at the I-End of the added frame object

  • point_j (str) – the name of a defined point object at the J-End of the added frame object

  • prop_name (str, optional) – if Default ETABS assigns a default section property to the frame object, if None no section property is assigned to the frame object, otherwise use the name of a defined frame section property

  • user_name (str, optional) – if a user_name is specified and that name is already used for another frame, cable or tendon object the program ignores the username, if no username is specified the program assigns a default name to the frame object

Returns:

the name ETABS ultimately assigns for the frame object

Return type:

str

get_design_orientation(frame_name: str) None[source]

Retrieves the design orientation for a frame object.

Parameters:

frame_name (str) – name of the frame object

Returns:

A value from the eFrameDesignOrientation enumeration

Return type:

etabs.eFrameDesignOrientation

get_design_procedure(frame_name: str) eFrameDesignProcedure[source]

Retrieves the design procedure for a frame object.

Parameters:

frame_name (str) – name of the frame object

Returns:

A value from the eFrameDesignProcedure enumeration

Return type:

eFrameDesignProcedure

get_group_assign(name: str) list[str][source]

Retrieves the groups to which a frame object is assigned.

Parameters:

name (str) – name of an existing frame object

Returns:

names of the groups to which the frame object is assigned

Return type:

list[str]

get_guid(frame_name: str) str[source]

Retrieves the GUID(Global Unique ID) for the specified frame object.

Parameters:

frame_name (str) – name of the frame object

Returns:

the GUID of the specified frame object

Return type:

str

get_label_from_name(frame_name: str) FrameObjectLabelData[source]

Retrieves the label and story for a unique frame object name.

Parameters:

frame_name (str) – name of the frame object

Returns:

label and story of frame object name

Return type:

FrameObjectLabelData

get_name_list() list[str][source]

Retrieves the names of all defined frame objects.

Returns:

frame object names

Return type:

list[str]

get_name_list_on_story(story_name: str) list[str][source]

Retrieves the names of the defined frame objects on a given story.

Parameters:

story_name (str) – name of an existing story

Returns:

frame object names on existing story

Return type:

list[str]

get_spring_assignment(frame_name: str) str[source]

Retrieves the frame object line spring assignment of the defined frame object.

Parameters:

frame_name (str) – unique name of an existing frame object

Returns:

frame object line spring assignment

Return type:

str

set_group_assign(name: str, group_name: str, remove: bool = False, item_type: None = None) None[source]

Adds or removes frame objects from a specified group.

Parameters:
  • name (str) – name of an existing frame object or group depending on the value of item_type

  • group_name (str) – name of an existing group to which the assignment is made

  • remove (bool, optional) – True for add, False for remove, defaults to False

  • item_type (eItemType, optional) – one of eItemType enumeration (Objects : frame object specified by name is added/removed from group, Group : all frame objects in the group specified by name are added/removed from group, SelectedObjects : all selected frame objects are added/removed from group, name is ignored), defaults to eItemType.Objects

set_spring_assignment(frame_name: str, line_spring_prop: str, item_type: None = None) None[source]

Assigns an existing line spring property to frame objects of the value item_type.

Parameters:
  • frame_name (str) – unique name of an existing frame object

  • line_spring_prop (str) – name of an existing line spring property

  • item_type (eItemType, optional) – one of eItemType enumeration (Objects : area object specified by name is added/removed from group, Group : all area objects in the group specified by name are added/removed from group, SelectedObjects : all selected area objects are added/removed from group, name is ignored), defaults to eItemType.Objects

pytabs.grid_sys module

class pytabs.grid_sys.GridSys(sap_model: None)[source]

Bases: object

GridSys interface

pytabs.group module

class pytabs.group.Group(sap_model: None)[source]

Bases: object

Group interface

set_group_1(group_name: str, group_color: int = -1, specified_selection: bool = True, specified_section_cut_def: bool = True, specified_steel_design: bool = True, specified_concrete_design: bool = True, specified_aluminum_design: bool = True, specified_static_nla_active: bool = True, specified_auto_seismic_output: bool = False, specified_auto_wind_output: bool = False, specified_mass_weight: bool = True, specified_steeljoist_design: bool = True, specified_wall_design: bool = True, specified_baseplate_design: bool = True, specified_connection_design: bool = True) None[source]

Sets the group data.

Parameters:
  • group_name (str) – name of group

  • group_color (int, optional) – display color of group, defaults to -1 (auto)

  • specified_selection (bool, optional) – True if the group is specified to be used for selection; otherwise False, defaults to True

  • specified_section_cut_def (bool, optional) – True if the group is specified to be used for defining section cuts; otherwise False, defaults to True

  • specified_steel_design (bool, optional) – True if the group is specified to be used for defining steel frame design groups; otherwise False, defaults to True

  • specified_concrete_design (bool, optional) – True if the group is specified to be used for defining concrete frame design groups; otherwise False, defaults to True

  • specified_aluminum_design (bool, optional) – True if the group is specified to be used for defining aluminum frame design groups; otherwise False, defaults to True

  • specified_static_nla_active (bool, optional) – True if the group is specified to be used for defining stages for nonlinear static analysis; otherwise False, defaults to True

  • specified_auto_seismic_output (bool, optional) – True if the group is specified to be used for reporting auto seismic loads; otherwise False, defaults to False

  • specified_auto_wind_output (bool, optional) – True if the group is specified to be used for reporting auto wind loads; otherwise False, defaults to False

  • specified_mass_weight (bool, optional) – True if the group is specified to be used for reporting group masses and weight; otherwise False, defaults to True

  • specified_steeljoist_design (bool, optional) – True if the group is specified to be used for defining steel joist design groups; otherwise False, defaults to True

  • specified_wall_design (bool, optional) – True if the group is specified to be used for defining wall design groups; otherwise False, defaults to True

  • specified_baseplate_design (bool, optional) – True if the group is specified to be used for defining base plate design groups; otherwise False, defaults to True

  • specified_connection_design (bool, optional) – True if the group is specified to be used for defining connection design groups; otherwise False, defaults to True

pytabs.line_elm module

class pytabs.line_elm.LineElm(sap_model: None)[source]

Bases: object

LineElm interface

pytabs.load_cases module

class pytabs.load_cases.LoadCases(sap_model: None)[source]

Bases: object

LoadCases interface

eLoadCaseType

EtabsModel LoadCaseType enumeration

change_name(case_name: str, new_case_name: str) None[source]

Changes the name of a defined Load Case.

Parameters:
  • case_name (str) – name of defined load case to change

  • new_case_name (str) – new name of load case

count(case_type: None | None = None) int[source]

Count of load cases of type if specified.

Parameters:

case_type (Union[None, eLoadCaseType], optional) – load case type enumeration, defaults to None

Returns:

count of load case of type, if specified, else all

Return type:

int

delete(case_name: str) None[source]

Deletes the specified load case.

Parameters:

case_name (str) – name of existing load case

get_name_list(case_type: None | None = None) list[str][source]

Retrieves the names of all defined load cases of the specified type.

Parameters:

case_type (Union[None, eLoadCaseType], optional) – load case type enumeration, defaults to None

Returns:

load case names of type, if specified, else all

Return type:

list[str]

get_type(case_name: str) LoadCaseType[source]

Retrieves the case type, design type, and auto flag for the specified load case.

Parameters:

case_name (str) – name of existing load case

Returns:

load case type details

Return type:

LoadCaseType

set_design_type(case_name: str, design_type_option: int, design_type: None = None) None[source]

Set design type of existing load case.

Parameters:
  • case_name (str) – name of existing load case

  • design_type_option (int) – design type option (0 = Program determined, 1 = User specified)

  • design_type (eLoadPatternType, optional) – design type, defaults to eLoadPatternType.Dead

pytabs.load_patterns module

class pytabs.load_patterns.LoadPatterns(sap_model: None)[source]

Bases: object

LoadPatterns interface

add(load_pattern_name: str, load_pattern_type: None, self_weight_multiplier: float = 0, add_analysis_case: bool = True)[source]

Adds a new load pattern.

Parameters:
  • load_pattern_name (str) – name for the new load pattern

  • load_pattern_type (eLoadPatternType) – one of the items in the eLoadPatternType enumeration

  • self_weight_multiplier (float, optional) – self weight multiplier for the new load pattern, defaults to 0

  • add_analysis_case (bool, optional) – if True, a linear static load case corresponding to the new load pattern is added, defaults to True

count() int[source]

Retrieves the number of defined load patterns.

Returns:

number of defined load patterns

Return type:

int

get_type(load_pattern_name: str) None[source]

Retrieves the load type for a specified load pattern.

Parameters:

load_pattern_name (str) – name of an existing load pattern

Returns:

one of the items in the eLoadPatternType enumeration

Return type:

eLoadPatternType

get_name_list() list[str][source]

Retrieves the names of all defined load cases.

Returns:

list of load pattern names

Return type:

list[str]

get_self_weight_multiplier(load_pattern_name: str) float[source]

Retrieves the self weight multiplier for a specified load pattern.

Parameters:

load_pattern_name (str) – name of an existing load pattern

Returns:

self weight multiplier for the specified load pattern

Return type:

float

set_load_type(load_pattern_name: str, load_pattern_type: None) None[source]

Assigns a load type to a load pattern.

Parameters:
  • load_pattern_name (str) – name of an existing load pattern

  • load_pattern_type (eLoadPatternType) – one of the items in the eLoadPatternType enumeration

set_self_weight_multiplier(load_pattern_name: str, self_weight_multiplier: float) None[source]

Assigns a self weight multiplier to a load case.

Parameters:
  • load_pattern_name (str) – name of an existing load pattern

  • self_weight_multiplier (float) – self weight multiplier for the specified load pattern

pytabs.model module

class pytabs.model.EtabsModel(attach_to_instance: bool = True, specific_etabs: bool = False, specific_etabs_path: str | Path = '', model_path: str | Path = '', remote_computer: str = '')[source]

Bases: object

pytabs ETABS Model Object EtabsObject 🏢.

All interfaces and enumerations to the Etabs model objects are accessed as properties - refer below.

point_elm: PointElm

EtabsModel PointElm interface.

eAreaDesignOrientation

EtabsModel AreaDesignOrientation enumeration.

eForce

EtabsModel Force enumeration.

eFrameDesignOrientation

EtabsModel FrameDesignOrientation enumeration.

eItemType

EtabsModel ItemType enumeration

eItemTypeElm

EtabsModel ItemTypeElm enumeration

eLength

EtabsModel Length enumeration.

eLoadPatternType

EtabsModel LoadPatternType enumeration

eObjType

EtabsModel ObjType enumeration

eTemperature

EtabsModel Temperature enumeration.

eUnits

EtabsModel Units enumeration.

pytabs_config

pyTABS config file (pytabs_config.ini)

model_open: bool

True if model open, otherwise False.

model_path: str | Path

Etabs model filepath.

active: bool

True if EtabsModel is active, otherwise False.

sap_model

EtabsModel SapModel interface.

analyse: Analyse

EtabsModel Analyse interface.

analysis_results_setup: AnalysisResultsSetup

EtabsModel AnalysisResultsSetup interface.

analysis_results: AnalysisResults

EtabsModel AnalysisResults interface.

area_elm: AreaElm

EtabsModel AreaElm interface.

area_obj: AreaObj

EtabsModel AreaObj interface.

combo: Combo

EtabsModel Combo interface.

constraint: Constraint

EtabsModel Constraint interface.

database_tables: DatabaseTables

EtabsModel DatabaseTables interface.

design_results: DesignResults

EtabsModel DesignResults interface.

diaphragm: Diaphragm

EtabsModel Diaphragm interface.

frame_obj: FrameObj

EtabsModel FrameObj interface.

grid_sys: GridSys

EtabsModel GridSys interface.

group: Group

EtabsModel Group interface.

line_elm: LineElm

EtabsModel LineElm interface.

EtabsModel LinkObj interface.

load_cases: LoadCases

EtabsModel LoadCases interface.

load_patterns: LoadPatterns

EtabsModel LoadPatterns interface.

pier_label: PierLabel

EtabsModel PierLabel interface.

point_obj: PointObj

EtabsModel PointObj interface.

property: Property

EtabsModel Property interface.

select: Select

EtabsModel Select interface.

spandrel_label: SpandrelLabel

EtabsModel SpandrelLabel interface.

story: Story

EtabsModel Story interface.

tendon_obj: TendonObj

EtabsModel TendonObj interface.

tower: Tower

EtabsModel Tower interface.

view: View

EtabsModel View interface.

exit_application()[source]

Terminates ETABS application severing API connection

open_model(model_path: str | Path) None[source]

Opens ETABS model file.

Parameters:

model_path (Union[str, Path]) – file path to ETABS model file

new_model(new_model_path: str | Path) None[source]

Creates new blank ETABS model and saves.

Parameters:

new_model_path (Union[str, Path]) – file path to save new blank ETABS model file

get_database_units() None[source]

Returns a value from the eUnits enumeration indicating the database units for the model. All data is internally stored in the model in these units and converted to the present units as needed.

Raises:

EtabsError – Database units could not be returned

Returns:

Units enumeration

Return type:

eUnits

get_database_units_components() UnitsComponents[source]

Retrieves the database units for the model. All data is internally stored in the model in these units and converted to the present units as needed.

Returns:

units for force, length and temperature units

Return type:

UnitsComponents

get_model_is_locked() bool[source]

Retrieves locked status of the model.

Returns:

True if model is looked, otherwise False

Return type:

bool

get_present_coord_system() str[source]

Retrieves model present coordinate system.

Returns:

name of coordinate system

Return type:

str

get_present_units() None[source]

Returns a value from the eUnits enumeration indicating the units presently specified for the model.

Raises:

EtabsError – Present units could not be returned

Returns:

Units enumeration

Return type:

eUnits

get_present_units_components() UnitsComponents[source]

Retrieves the units presently specified for the model.

Returns:

units components for force, length and temperature units

Return type:

UnitsComponents

set_model_is_locked(lock_it: bool = True)[source]

Locks or unlocks the model.

Parameters:

lock_it (bool, optional) – True to lock mode, False to unlock, defaults to True

set_present_units(units: None)[source]

Sets the display (present) units.

Parameters:

units (eUnits) – Units enumeration to set.

set_present_units_components(force_units: None, length_units: None, temperature_units: None)[source]

Specifies the units for the model.

Parameters:
  • force_units (eForce) – Force enumeration to set

  • length_units (eLength) – Length enumeration to set

  • temperature_units (eTemperature) – Temperature enumeration to set

pytabs.pier_label module

class pytabs.pier_label.PierLabel(sap_model: None)[source]

Bases: object

PierLabel interface

change_name(pier_name: str, new_pier_name: str) None[source]

Changes the name of a defined Pier Label.

Parameters:
  • pier_name (str) – name of defined pier to change

  • new_pier_name (str) – new name of pier

delete(pier_name: str) None[source]

Deletes the specified Pier Label.

Parameters:

pier_name (str) – name of defined pier to delete

get_names_list() list[str][source]

Retrieves the names of all defined Pier Labels.

Returns:

All Pier Labels

Return type:

list[str]

get_pier(pier_name: str) bool[source]

Checks whether the specified Pier Label exists.

Parameters:

pier_name (str) – pier name to check

Returns:

True if the Pier Label exists, False otherwise

Return type:

bool

get_section_properties(pier_name: str) PierSectionProperties[source]

Retrieves the section properties for a specified pier.

Parameters:

pier_name (str) – Pier name for which to retrieve section properties

Returns:

section properties of requested Pier

Return type:

PierSectionProperties

set_pier(pier_name: str) None[source]

Adds a new Pier Label.

Parameters:

pier_name (str) – name of new pier label

pytabs.point_elm module

class pytabs.point_elm.PointElm(sap_model: None)[source]

Bases: object

PointElm interface

pytabs.point_obj module

class pytabs.point_obj.PointObj(sap_model: None)[source]

Bases: object

PointObj interface

eDiaphragmOption

EtabsModel DiaphragmOption enumeration

get_name_from_label(label: str, story: str) str[source]

Retrieves the unique name of a point object, given the label and story level.

Parameters:
  • label (str) – The point object label

  • story (str) – The point object story level

Return point_name:

The unique name of the point object

Return type:

str

get_name_list_on_story(story_name: str) list[str][source]

Retrieves the names of the defined point objects on a given story.

Parameters:

story_name (str) – name of an existing story

Returns:

point object names on existing story

Return type:

list[str]

get_coordinate_cartesian(point_name, coord_system: str = 'Global') list[float][source]

Retrieves the x, y, and z coordinates of the specified point object in the present units

Parameters:
  • point_name (str) – unique name of an existing point object

  • coord_system (str) – coordinate system definition, ‘Global’ by default

Returns:

cartesian coordinate matrix [x, y, z] for the specified coordinate system in the present units

Return type:

float

get_uncoupled_spring(point_name: str) list[float][source]

Retrieves the sum of uncoupled spring stiffness assignments for a point object / i.e. the diagonal terms in the 6x6 spring matrix for the point object.

Parameters:

point_name (str) – unique name of an existing point object

Returns:

point object spring stiffness matrix [U1, U2, U3, R1, R2, R3]

Return type:

list[float]

get_spring_assignment(point_name: str) str[source]

Retrieves the point object spring assignment of the defined point object.

Parameters:

point_name (str) – unique name of an existing point object

Returns:

point object spring assignment

Return type:

str

set_spring_assignment(point_name: str, point_spring_prop: str, item_type: None = None) None[source]

Assigns an existing name point spring property to point objects.

Parameters:
  • point_name (str) – unique name of an existing point object

  • point_spring_prop (str) – name of an existing point spring property

  • item_type (eItemType, optional) – one of eItemType enumeration (Objects : area object specified by name is added/removed from group, Group : all area objects in the group specified by name are added/removed from group, SelectedObjects : all selected area objects are added/removed from group, name is ignored), defaults to eItemType.Objects

pytabs.property module

class pytabs.property.Property(sap_model: None)[source]

Bases: object

Properties interface

pytabs.pytabs_config module

pytabs.pytabs_config.read_config()[source]

Read pyTabs configuration file (pytabs_config.ini)

pytabs.select module

class pytabs.select.Select(sap_model: None)[source]

Bases: object

Select interface

all(deselect: bool = False) None[source]

Selects or deselects all objects in the model.

Parameters:

deselect (bool, optional) – False if objects are to be selected and True if they are to be deselected, defaults to False

clear_selection() None[source]

Deselects all objects in the model.

get_selected() SelectedObjects[source]

Retrieves a list of selected objects.

Returns:

Quantity, Type and Names of the selected objects

Return type:

SelectedObjects

group(name: str, deselect: bool = False) None[source]

Selects or deselects all objects in the specified group.

Parameters:
  • name (str) – The name of an existing group

  • deselect (bool, optional) – False if objects are to be selected and True if they are to be deselected, defaults to False

invert_selection() None[source]

Deselects all selected objects and selects all unselected objects; that is, it inverts the selection.

previous_selection() None[source]

Restores the previous selection.

pytabs.spandrel_label module

class pytabs.spandrel_label.SpandrelLabel(sap_model: None)[source]

Bases: object

SpandrelLabel interface

change_name(spandrel_label: str, new_spandrel_label: str) None[source]

Changes the name of a defined Spandrel Label

Parameters:
  • spandrel_label (str) – the existing name of a defined Spandrel

  • new_spandrel_label (str) – the new name for the Spandrel Label

delete(spandrel_label: str) None[source]

Deletes the specified Spandrel Label

Parameters:

spandrel_label (str) – the name of an existing Spandrel Label

get_name_list() SpandrelNameList[source]

Retrieves the names of all defined Spandrel Labels

Returns:

all story names and if spans multiple stories

Return type:

SpandrelNameList

get_section_properties(spandrel_name: str) SectionProperties[source]

Retrieves the section properties for a specified spandrel

Parameters:

spandrel_name (str) – name of an existing spandrel

Returns:

section properties for the specified spandrel

Return type:

SectionProperties

get_spandrel(spandrel_name: str) None | dict[source]

Retrieves the specified Spandrel Label

Parameters:

spandrel_name (str) – name of an existing spandrel

Returns:

If spandrel exists, dict with Spandrel name and whether it is multi-story, else None

Return type:

Union[None, dict]

set_spandrel(spandrel_name: str, is_multi_story: bool) None[source]

Adds a new Spandrel Label or modifies and existing Spandrel Label

Parameters:
  • spandrel_name (str) – name of the spandrel, if existing spandrel label is modified

  • is_multi_story (bool) – whether the Spandrel Label spans multiple story levels

pytabs.story module

class pytabs.story.Story(sap_model: None)[source]

Bases: object

Story interface

get_elevation(story_name: str) float[source]

Retrieves the elevation of a defined story.

Parameters:

story_name (str) – name of a defined story

Returns:

elevation of the story

Return type:

float

get_guid(story_name: int) str[source]

Retrieves the GUID of a defined story.

Parameters:

story_name (int) – name of a defined story

Returns:

GUID of the story

Return type:

str

get_height(story_name: str) float[source]

Retrieves the height of a defined story.

Parameters:

story_name (str) – name of a defined story

Returns:

height of the story

Return type:

float

get_master_story(story_name: str) bool[source]

Retrieves whether a defined story is a master story.

Parameters:

story_name (str) – name of a defined story

Returns:

True if the story is a master story, False otherwise

Return type:

bool

get_name_list() list[str][source]

Retrieves the names of all defined stories.

Returns:

all story names

Return type:

list[str]

get_similar_to(story_name: str) str | None[source]

Retrieves whether a defined story is a master story.

Parameters:

story_name (str) – name of a defined story

Returns:

name of similar story, if story is master returns None

Return type:

Union[str, None]

get_splice(story_name: str) float | None[source]

Retrieves the story splice height, if applicable.

Parameters:

story_name (str) – name of a defined story

Returns:

height of splice, if present otherwise None

Return type:

Union[float, None]

get_stories() StoryInfo[source]

Retrieves the story information for the current tower.

Returns:

story information for all stories

Return type:

StoryInfo

set_elevation(story_name: int, elevation: float) None[source]

Sets the elevation of a defined story.

Parameters:
  • story_name (int) – name of a defined story

  • elevation (float) – elevation of the story

set_guid(story_name: str, guid: str = '') None[source]

Sets the GUID of a defined story.

Parameters:
  • story_name (str) – name of a defined story

  • guid (str, optional) – GUID of the story, defaults to ‘’

set_height(story_name: int, height: float) None[source]

Sets the height of a defined story.

Parameters:
  • story_name (int) – name of a defined story

  • height (float) – height of the story

set_master_story(story_name: str, is_master_story: bool) None[source]

Sets whether a defined story is a master story.

Parameters:
  • story_name (str) – name of a defined story

  • is_master_story (bool) – True if the story is a master story, False otherwise

set_similar(story_name: str, similar_to_story: str) None[source]

Sets the master story that a defined story should be similar to.

Parameters:
  • story_name (str) – name of a defined story which is not a master story

  • similar_to_story (str) – name of a defined master story that the requested story should be similar to

set_splice(story_name: str, splice_above: bool, splice_height: float) None[source]

Sets the splice height of a defined story.

Parameters:
  • story_name (str) – name of defined story

  • splice_above (bool) – True if the story has a splice height, and False otherwise

  • splice_height (float) – story splice height

set_stories(base_elevation: float, number_stories: int, story_names: list[str], story_heights: list[float], is_master_story: list[bool], similar_to_story: list[str], splice_above: list[bool], splice_height: list[float], colour: list[int]) None[source]

Sets the stories for the current tower.

Parameters:
  • base_elevation (float) – elevation of the base

  • number_stories (int) – number of stories

  • story_names (list[str]) – names of the stories

  • story_heights (list[float]) – story heights

  • is_master_story (list[bool]) – True if the story is master story, and False otherwise

  • similar_to_story (list[str]) – if the story is not a master story, which master story the story is similar to

  • splice_above (list[bool]) – True if the story has a splice height, and False otherwise

  • splice_height (list[float]) – story splice height

  • colour (list[int]) – display color for the story specified

pytabs.tendon_obj module

class pytabs.tendon_obj.TendonObj(sap_model: None)[source]

Bases: object

TendonObj interface

pytabs.tower module

class pytabs.tower.Tower(sap_model: None)[source]

Bases: object

Tower interface

pytabs.view module

class pytabs.view.View(sap_model: None)[source]

Bases: object

View interface

refresh_view(window: int = 0, zoom: bool = True) None[source]

Refreshes the view for the specified window(s).

Parameters:
  • window (int, optional) – window number, with 0 for all windows, defaults to 0

  • zoom (bool, optional) – True to maintain window current zoom level, False to reset window zoom level to default, defaults to True

Module contents

PyTABS A Python wrapper for CSi ETABS .NET API - a simple yet robust Python interface to the ETABS .NET API. Not affiliated with Computer and Structures Inc.