pytabs.combo
1# pyTABS - ETABS .NET API python wrapper 2# Combo - cCombo 3__all__ = ['Combo'] 4 5# import ETABS namespace and pyTABS error handler 6from pytabs.etabs_config import * 7from pytabs.error_handle import * 8 9# import custom enumerations 10 11 12# import typing 13from typing import TypedDict 14 15class CaseList(TypedDict): 16 """TypedDict class for case list return""" 17 number_items : int 18 cname_types : list[etabs.eCNameType] 19 cnames : list[str] 20 mode_numbers : list[int] 21 scaling_factors : list[float] 22 23 24class Combo: 25 """Combo interface""" 26 def __init__(self, sap_model : etabs.cSapModel) -> None: 27 # link of SapModel interface 28 self.sap_model = sap_model 29 # create interface for static nonlinear staged load cases 30 self.combo = etabs.cCombo(sap_model.RespCombo) 31 32 # relate relevant ETABS enumerations 33 self.eCNameType = etabs.eCNameType 34 """EtabsModel `CNameType` enumeration""" 35 36 # relate custom enumerations 37 38 39 def get_case_list(self, name : str) -> CaseList: 40 """Retrieves all load cases and response combinations included in the load combination specified by the Name item. 41 42 :param name: The name of an existing load combination. 43 :type name: str 44 :return: Load cases and response combinations included 45 :rtype: CaseList 46 """ 47 number_items = int() 48 cname_types = [etabs.eCNameType.LoadCase] 49 cnames = [str()] 50 mode_numbers = [int()] 51 scaling_factors = [float()] 52 [ret, number_items, cname_types, 53 cnames, mode_numbers, scaling_factors] = self.combo.GetCaseList_1(name, number_items, cname_types, 54 cnames, mode_numbers, scaling_factors) 55 handle(ret) 56 return {'number_items': number_items, 57 'cname_types': list(cname_types), 58 'cnames': list(cnames), 59 'mode_numbers': list(mode_numbers), 60 'scaling_factors': list(scaling_factors)} 61 62 63 def get_name_list(self) -> list[str]: 64 """Retrieves the names of all defined response combinations. 65 66 :return: list of combination names 67 :rtype: list[str] 68 """ 69 number_names = int() 70 combo_names = [str()] 71 [ret, number_names, combo_names] = self.combo.GetNameList(number_names, combo_names) 72 handle(ret) 73 return list(combo_names)
class
Combo:
25class Combo: 26 """Combo interface""" 27 def __init__(self, sap_model : etabs.cSapModel) -> None: 28 # link of SapModel interface 29 self.sap_model = sap_model 30 # create interface for static nonlinear staged load cases 31 self.combo = etabs.cCombo(sap_model.RespCombo) 32 33 # relate relevant ETABS enumerations 34 self.eCNameType = etabs.eCNameType 35 """EtabsModel `CNameType` enumeration""" 36 37 # relate custom enumerations 38 39 40 def get_case_list(self, name : str) -> CaseList: 41 """Retrieves all load cases and response combinations included in the load combination specified by the Name item. 42 43 :param name: The name of an existing load combination. 44 :type name: str 45 :return: Load cases and response combinations included 46 :rtype: CaseList 47 """ 48 number_items = int() 49 cname_types = [etabs.eCNameType.LoadCase] 50 cnames = [str()] 51 mode_numbers = [int()] 52 scaling_factors = [float()] 53 [ret, number_items, cname_types, 54 cnames, mode_numbers, scaling_factors] = self.combo.GetCaseList_1(name, number_items, cname_types, 55 cnames, mode_numbers, scaling_factors) 56 handle(ret) 57 return {'number_items': number_items, 58 'cname_types': list(cname_types), 59 'cnames': list(cnames), 60 'mode_numbers': list(mode_numbers), 61 'scaling_factors': list(scaling_factors)} 62 63 64 def get_name_list(self) -> list[str]: 65 """Retrieves the names of all defined response combinations. 66 67 :return: list of combination names 68 :rtype: list[str] 69 """ 70 number_names = int() 71 combo_names = [str()] 72 [ret, number_names, combo_names] = self.combo.GetNameList(number_names, combo_names) 73 handle(ret) 74 return list(combo_names)
Combo interface
Combo(sap_model: ETABSv1.cSapModel)
27 def __init__(self, sap_model : etabs.cSapModel) -> None: 28 # link of SapModel interface 29 self.sap_model = sap_model 30 # create interface for static nonlinear staged load cases 31 self.combo = etabs.cCombo(sap_model.RespCombo) 32 33 # relate relevant ETABS enumerations 34 self.eCNameType = etabs.eCNameType 35 """EtabsModel `CNameType` enumeration""" 36 37 # relate custom enumerations
def
get_case_list(self, name: str) -> pytabs.combo.CaseList:
40 def get_case_list(self, name : str) -> CaseList: 41 """Retrieves all load cases and response combinations included in the load combination specified by the Name item. 42 43 :param name: The name of an existing load combination. 44 :type name: str 45 :return: Load cases and response combinations included 46 :rtype: CaseList 47 """ 48 number_items = int() 49 cname_types = [etabs.eCNameType.LoadCase] 50 cnames = [str()] 51 mode_numbers = [int()] 52 scaling_factors = [float()] 53 [ret, number_items, cname_types, 54 cnames, mode_numbers, scaling_factors] = self.combo.GetCaseList_1(name, number_items, cname_types, 55 cnames, mode_numbers, scaling_factors) 56 handle(ret) 57 return {'number_items': number_items, 58 'cname_types': list(cname_types), 59 'cnames': list(cnames), 60 'mode_numbers': list(mode_numbers), 61 'scaling_factors': list(scaling_factors)}
Retrieves all load cases and response combinations included in the load combination specified by the Name item.
Parameters
- name: The name of an existing load combination.
Returns
Load cases and response combinations included
def
get_name_list(self) -> list[str]:
64 def get_name_list(self) -> list[str]: 65 """Retrieves the names of all defined response combinations. 66 67 :return: list of combination names 68 :rtype: list[str] 69 """ 70 number_names = int() 71 combo_names = [str()] 72 [ret, number_names, combo_names] = self.combo.GetNameList(number_names, combo_names) 73 handle(ret) 74 return list(combo_names)
Retrieves the names of all defined response combinations.
Returns
list of combination names