pytabs.frame_obj
1# pyTABS - ETABS .NET API python wrapper 2# FrameObj - cFrameObj interface 3__all__ = ['FrameObj'] 4 5# import ETABS namespace and pyTABS error handler 6from pytabs.etabs_config import * 7from pytabs.error_handle import * 8 9# import pyTABS custom enumerations 10from pytabs.enumerations import eFrameDesignProcedure 11 12 13# import typing 14from typing import TypedDict 15 16class FrameObjectLabelData(TypedDict): 17 """TypedDict class for Frame object label data return""" 18 frame_name : str 19 frame_label : str 20 frame_story : str 21 22class FrameObj: 23 """FrameObj interface""" 24 def __init__(self, sap_model : etabs.cSapModel) -> None: 25 # link of SapModel interface 26 self.sap_model = sap_model 27 # create FrameObj interface 28 self.frame_obj = etabs.cFrameObj(self.sap_model.FrameObj) 29 30 # relate relevant ETABS enumerations 31 self.eHingeLocationType = etabs.eHingeLocationType 32 """EtabsModel `HingeLocationType` enumeration""" 33 34 35 def add_by_coord(self, xi_coordinate : float, yi_coordinate : float, zi_coordinate : float, 36 xj_coordinate : float, yj_coordinate : float, zj_coordinate : float, 37 prop_name : str = "Default", user_name : str = "", coordinate_sys : str = "Global" ) -> str: 38 """Adds a new frame object whose end points are at the specific coordinates. 39 40 :param xi_coordinate: the X coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item 41 :type xi_coordinate: float 42 :param yi_coordinate: the Y coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item 43 :type yi_coordinate: float 44 :param zi_coordinate: the Z coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item 45 :type zi_coordinate: float 46 :param xj_coordinate: the X coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item 47 :type xj_coordinate: float 48 :param yj_coordinate: the Y coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item 49 :type yj_coordinate: float 50 :param zj_coordinate: the Z coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item 51 :type zj_coordinate: float 52 :param prop_name: 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 53 :type prop_name: str, optional 54 :param user_name: 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 55 :type user_name: str, optional 56 :param coordinate_sys: the name of the coordinate system in which the frame object end point coordinates are defined 57 :type coordinate_sys: str, optional 58 :return: the name ETABS ultimately assigns for the frame object 59 :rtype: str 60 """ 61 frame_name = str() 62 [ret, frame_name] = self.frame_obj.AddByCoord(xi_coordinate, yi_coordinate, zi_coordinate, 63 xj_coordinate, yj_coordinate, zj_coordinate, 64 frame_name, prop_name, user_name, coordinate_sys) 65 handle(ret) 66 return str(frame_name) 67 68 69 def add_by_point(self, point_i : str, point_j : str, prop_name : str = "Default", user_name : str = "") -> str: 70 """Adds a new frame object whose end points are specified by name. 71 :param point_i: the name of a defined point object at the I-End of the added frame object 72 :type point_i: str 73 param point_j: the name of a defined point object at the J-End of the added frame object 74 :type point_j: str 75 :param prop_name: 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 76 :type prop_name: str, optional 77 :param user_name: 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 78 :type user_name: str,optional 79 :return: the name ETABS ultimately assigns for the frame object 80 :rtype: str 81 """ 82 frame_name = str() 83 [ret, frame_name] = self.frame_obj.AddByPoint(point_i, point_j, frame_name, prop_name, user_name) 84 handle(ret) 85 return str(frame_name) 86 87 88 def get_design_orientation(self, frame_name : str) -> etabs.eFrameDesignOrientation: 89 """Retrieves the design orientation for a frame object. 90 91 :param frame_name: name of the frame object 92 :type frame_name: str 93 :return: A value from the eFrameDesignOrientation enumeration 94 :rtype: etabs.eFrameDesignOrientation 95 """ 96 design_orientation = etabs.eFrameDesignOrientation.Null 97 [ret, design_orientation] = self.frame_obj.GetDesignOrientation(frame_name, design_orientation) 98 handle(ret) 99 return design_orientation 100 101 102 def get_design_procedure(self, frame_name : str) -> eFrameDesignProcedure: 103 """Retrieves the design procedure for a frame object. 104 105 :param frame_name: name of the frame object 106 :type frame_name: str 107 :return: A value from the eFrameDesignProcedure enumeration 108 :rtype: eFrameDesignProcedure 109 """ 110 procedure_type = int() 111 [ret, procedure_type] = self.frame_obj.GetDesignProcedure(frame_name, procedure_type) 112 handle(ret) 113 return eFrameDesignProcedure(procedure_type) 114 115 116 def get_group_assign(self, name : str) -> list[str]: 117 """Retrieves the groups to which a frame object is assigned. 118 119 :param name: name of an existing frame object 120 :type name: str 121 :return: names of the groups to which the frame object is assigned 122 :rtype: list[str] 123 """ 124 number_groups = int() 125 groups = [str()] 126 [ret, number_groups, groups] = self.frame_obj.GetGroupAssign(name, number_groups, groups) 127 handle(ret) 128 return list(groups) 129 130 131 def get_GUID(self, frame_name : str) -> str: 132 """Retrieves the GUID(Global Unique ID) for the specified frame object. 133 134 :param frame_name: name of the frame object 135 :type frame_name: str 136 :return: the GUID of the specified frame object 137 :rtype: str 138 """ 139 guid = str() 140 [ret, guid] = self.frame_obj.GetGUID(frame_name, guid) 141 handle(ret) 142 return guid 143 144 145 def get_label_from_name(self, frame_name : str) -> FrameObjectLabelData: 146 """Retrieves the label and story for a unique frame object name. 147 :param frame_name: name of the frame object 148 :type frame_name: str 149 :return: label and story of frame object name 150 :rtype: `FrameObjectLabelData` 151 """ 152 frame_label = str() 153 frame_story = str() 154 [ret, frame_label, frame_story] = self.frame_obj.GetLabelFromName(frame_name, frame_label, frame_story) 155 handle(ret) 156 return {'frame_name': frame_name, 157 'frame_label': frame_label, 158 'frame_story': frame_story} 159 160 161 #TODO def get_modifiers(self, name : str) 162 163 164 def get_name_list(self) -> list[str]: 165 """Retrieves the names of all defined frame objects. 166 167 :return: frame object names 168 :rtype: list[str] 169 """ 170 number_names = int() 171 frame_names = [str()] 172 [ret, number_names, frame_names] = self.frame_obj.GetNameList(number_names, frame_names) 173 handle(ret) 174 return list(frame_names) 175 176 177 def get_name_list_on_story(self, story_name : str) -> list[str]: 178 """Retrieves the names of the defined frame objects on a given story. 179 180 :param story_name: name of an existing story 181 :type story_name: str 182 :return: frame object names on existing story 183 :rtype: list[str] 184 """ 185 number_names = int() 186 frame_names = [str()] 187 [ret, number_names, frame_names] = self.frame_obj.GetNameListOnStory(story_name, number_names, frame_names) 188 handle(ret) 189 return list(frame_names) 190 191 192 def set_group_assign(self, name : str, group_name : str, remove : bool = False, item_type: etabs.eItemType = etabs.eItemType.Objects) -> None: 193 """Adds or removes frame objects from a specified group. 194 195 :param name: name of an existing frame object or group depending on the value of item_type 196 :type name: str 197 :param group_name: name of an existing group to which the assignment is made 198 :type group_name: str 199 :param remove: `True` for add, False for remove, defaults to `False` 200 :type remove: bool, optional 201 :param item_type: 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` 202 :type item_type: eItemType, optional 203 """ 204 handle(self.frame_obj.SetGroupAssign(name, group_name, remove, item_type))
23class FrameObj: 24 """FrameObj interface""" 25 def __init__(self, sap_model : etabs.cSapModel) -> None: 26 # link of SapModel interface 27 self.sap_model = sap_model 28 # create FrameObj interface 29 self.frame_obj = etabs.cFrameObj(self.sap_model.FrameObj) 30 31 # relate relevant ETABS enumerations 32 self.eHingeLocationType = etabs.eHingeLocationType 33 """EtabsModel `HingeLocationType` enumeration""" 34 35 36 def add_by_coord(self, xi_coordinate : float, yi_coordinate : float, zi_coordinate : float, 37 xj_coordinate : float, yj_coordinate : float, zj_coordinate : float, 38 prop_name : str = "Default", user_name : str = "", coordinate_sys : str = "Global" ) -> str: 39 """Adds a new frame object whose end points are at the specific coordinates. 40 41 :param xi_coordinate: the X coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item 42 :type xi_coordinate: float 43 :param yi_coordinate: the Y coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item 44 :type yi_coordinate: float 45 :param zi_coordinate: the Z coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item 46 :type zi_coordinate: float 47 :param xj_coordinate: the X coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item 48 :type xj_coordinate: float 49 :param yj_coordinate: the Y coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item 50 :type yj_coordinate: float 51 :param zj_coordinate: the Z coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item 52 :type zj_coordinate: float 53 :param prop_name: 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 54 :type prop_name: str, optional 55 :param user_name: 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 56 :type user_name: str, optional 57 :param coordinate_sys: the name of the coordinate system in which the frame object end point coordinates are defined 58 :type coordinate_sys: str, optional 59 :return: the name ETABS ultimately assigns for the frame object 60 :rtype: str 61 """ 62 frame_name = str() 63 [ret, frame_name] = self.frame_obj.AddByCoord(xi_coordinate, yi_coordinate, zi_coordinate, 64 xj_coordinate, yj_coordinate, zj_coordinate, 65 frame_name, prop_name, user_name, coordinate_sys) 66 handle(ret) 67 return str(frame_name) 68 69 70 def add_by_point(self, point_i : str, point_j : str, prop_name : str = "Default", user_name : str = "") -> str: 71 """Adds a new frame object whose end points are specified by name. 72 :param point_i: the name of a defined point object at the I-End of the added frame object 73 :type point_i: str 74 param point_j: the name of a defined point object at the J-End of the added frame object 75 :type point_j: str 76 :param prop_name: 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 77 :type prop_name: str, optional 78 :param user_name: 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 79 :type user_name: str,optional 80 :return: the name ETABS ultimately assigns for the frame object 81 :rtype: str 82 """ 83 frame_name = str() 84 [ret, frame_name] = self.frame_obj.AddByPoint(point_i, point_j, frame_name, prop_name, user_name) 85 handle(ret) 86 return str(frame_name) 87 88 89 def get_design_orientation(self, frame_name : str) -> etabs.eFrameDesignOrientation: 90 """Retrieves the design orientation for a frame object. 91 92 :param frame_name: name of the frame object 93 :type frame_name: str 94 :return: A value from the eFrameDesignOrientation enumeration 95 :rtype: etabs.eFrameDesignOrientation 96 """ 97 design_orientation = etabs.eFrameDesignOrientation.Null 98 [ret, design_orientation] = self.frame_obj.GetDesignOrientation(frame_name, design_orientation) 99 handle(ret) 100 return design_orientation 101 102 103 def get_design_procedure(self, frame_name : str) -> eFrameDesignProcedure: 104 """Retrieves the design procedure for a frame object. 105 106 :param frame_name: name of the frame object 107 :type frame_name: str 108 :return: A value from the eFrameDesignProcedure enumeration 109 :rtype: eFrameDesignProcedure 110 """ 111 procedure_type = int() 112 [ret, procedure_type] = self.frame_obj.GetDesignProcedure(frame_name, procedure_type) 113 handle(ret) 114 return eFrameDesignProcedure(procedure_type) 115 116 117 def get_group_assign(self, name : str) -> list[str]: 118 """Retrieves the groups to which a frame object is assigned. 119 120 :param name: name of an existing frame object 121 :type name: str 122 :return: names of the groups to which the frame object is assigned 123 :rtype: list[str] 124 """ 125 number_groups = int() 126 groups = [str()] 127 [ret, number_groups, groups] = self.frame_obj.GetGroupAssign(name, number_groups, groups) 128 handle(ret) 129 return list(groups) 130 131 132 def get_GUID(self, frame_name : str) -> str: 133 """Retrieves the GUID(Global Unique ID) for the specified frame object. 134 135 :param frame_name: name of the frame object 136 :type frame_name: str 137 :return: the GUID of the specified frame object 138 :rtype: str 139 """ 140 guid = str() 141 [ret, guid] = self.frame_obj.GetGUID(frame_name, guid) 142 handle(ret) 143 return guid 144 145 146 def get_label_from_name(self, frame_name : str) -> FrameObjectLabelData: 147 """Retrieves the label and story for a unique frame object name. 148 :param frame_name: name of the frame object 149 :type frame_name: str 150 :return: label and story of frame object name 151 :rtype: `FrameObjectLabelData` 152 """ 153 frame_label = str() 154 frame_story = str() 155 [ret, frame_label, frame_story] = self.frame_obj.GetLabelFromName(frame_name, frame_label, frame_story) 156 handle(ret) 157 return {'frame_name': frame_name, 158 'frame_label': frame_label, 159 'frame_story': frame_story} 160 161 162 #TODO def get_modifiers(self, name : str) 163 164 165 def get_name_list(self) -> list[str]: 166 """Retrieves the names of all defined frame objects. 167 168 :return: frame object names 169 :rtype: list[str] 170 """ 171 number_names = int() 172 frame_names = [str()] 173 [ret, number_names, frame_names] = self.frame_obj.GetNameList(number_names, frame_names) 174 handle(ret) 175 return list(frame_names) 176 177 178 def get_name_list_on_story(self, story_name : str) -> list[str]: 179 """Retrieves the names of the defined frame objects on a given story. 180 181 :param story_name: name of an existing story 182 :type story_name: str 183 :return: frame object names on existing story 184 :rtype: list[str] 185 """ 186 number_names = int() 187 frame_names = [str()] 188 [ret, number_names, frame_names] = self.frame_obj.GetNameListOnStory(story_name, number_names, frame_names) 189 handle(ret) 190 return list(frame_names) 191 192 193 def set_group_assign(self, name : str, group_name : str, remove : bool = False, item_type: etabs.eItemType = etabs.eItemType.Objects) -> None: 194 """Adds or removes frame objects from a specified group. 195 196 :param name: name of an existing frame object or group depending on the value of item_type 197 :type name: str 198 :param group_name: name of an existing group to which the assignment is made 199 :type group_name: str 200 :param remove: `True` for add, False for remove, defaults to `False` 201 :type remove: bool, optional 202 :param item_type: 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` 203 :type item_type: eItemType, optional 204 """ 205 handle(self.frame_obj.SetGroupAssign(name, group_name, remove, item_type))
FrameObj interface
25 def __init__(self, sap_model : etabs.cSapModel) -> None: 26 # link of SapModel interface 27 self.sap_model = sap_model 28 # create FrameObj interface 29 self.frame_obj = etabs.cFrameObj(self.sap_model.FrameObj) 30 31 # relate relevant ETABS enumerations 32 self.eHingeLocationType = etabs.eHingeLocationType 33 """EtabsModel `HingeLocationType` enumeration"""
36 def add_by_coord(self, xi_coordinate : float, yi_coordinate : float, zi_coordinate : float, 37 xj_coordinate : float, yj_coordinate : float, zj_coordinate : float, 38 prop_name : str = "Default", user_name : str = "", coordinate_sys : str = "Global" ) -> str: 39 """Adds a new frame object whose end points are at the specific coordinates. 40 41 :param xi_coordinate: the X coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item 42 :type xi_coordinate: float 43 :param yi_coordinate: the Y coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item 44 :type yi_coordinate: float 45 :param zi_coordinate: the Z coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item 46 :type zi_coordinate: float 47 :param xj_coordinate: the X coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item 48 :type xj_coordinate: float 49 :param yj_coordinate: the Y coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item 50 :type yj_coordinate: float 51 :param zj_coordinate: the Z coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item 52 :type zj_coordinate: float 53 :param prop_name: 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 54 :type prop_name: str, optional 55 :param user_name: 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 56 :type user_name: str, optional 57 :param coordinate_sys: the name of the coordinate system in which the frame object end point coordinates are defined 58 :type coordinate_sys: str, optional 59 :return: the name ETABS ultimately assigns for the frame object 60 :rtype: str 61 """ 62 frame_name = str() 63 [ret, frame_name] = self.frame_obj.AddByCoord(xi_coordinate, yi_coordinate, zi_coordinate, 64 xj_coordinate, yj_coordinate, zj_coordinate, 65 frame_name, prop_name, user_name, coordinate_sys) 66 handle(ret) 67 return str(frame_name)
Adds a new frame object whose end points are at the specific coordinates.
Parameters
- xi_coordinate: the X coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item
- yi_coordinate: the Y coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item
- zi_coordinate: the Z coordinates of the I-End of the added frame object in the coordinate system defined by the coordinate_sys item
- xj_coordinate: the X coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item
- yj_coordinate: the Y coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item
- zj_coordinate: the Z coordinates of the J-End of the added frame object in the coordinate system defined by the coordinate_sys item
- prop_name: if
Default
ETABS assigns a default section property to the frame object, ifNone
no section property is assigned to the frame object, otherwise use the name of a defined frame section property - user_name: 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: 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
70 def add_by_point(self, point_i : str, point_j : str, prop_name : str = "Default", user_name : str = "") -> str: 71 """Adds a new frame object whose end points are specified by name. 72 :param point_i: the name of a defined point object at the I-End of the added frame object 73 :type point_i: str 74 param point_j: the name of a defined point object at the J-End of the added frame object 75 :type point_j: str 76 :param prop_name: 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 77 :type prop_name: str, optional 78 :param user_name: 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 79 :type user_name: str,optional 80 :return: the name ETABS ultimately assigns for the frame object 81 :rtype: str 82 """ 83 frame_name = str() 84 [ret, frame_name] = self.frame_obj.AddByPoint(point_i, point_j, frame_name, prop_name, user_name) 85 handle(ret) 86 return str(frame_name)
Adds a new frame object whose end points are specified by name.
Parameters
- point_i: the name of a defined point object at the I-End of the added frame object param point_j: the name of a defined point object at the J-End of the added frame object
- prop_name: if
Default
ETABS assigns a default section property to the frame object, ifNone
no section property is assigned to the frame object, otherwise use the name of a defined frame section property - user_name: 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
89 def get_design_orientation(self, frame_name : str) -> etabs.eFrameDesignOrientation: 90 """Retrieves the design orientation for a frame object. 91 92 :param frame_name: name of the frame object 93 :type frame_name: str 94 :return: A value from the eFrameDesignOrientation enumeration 95 :rtype: etabs.eFrameDesignOrientation 96 """ 97 design_orientation = etabs.eFrameDesignOrientation.Null 98 [ret, design_orientation] = self.frame_obj.GetDesignOrientation(frame_name, design_orientation) 99 handle(ret) 100 return design_orientation
Retrieves the design orientation for a frame object.
Parameters
- frame_name: name of the frame object
Returns
A value from the eFrameDesignOrientation enumeration
103 def get_design_procedure(self, frame_name : str) -> eFrameDesignProcedure: 104 """Retrieves the design procedure for a frame object. 105 106 :param frame_name: name of the frame object 107 :type frame_name: str 108 :return: A value from the eFrameDesignProcedure enumeration 109 :rtype: eFrameDesignProcedure 110 """ 111 procedure_type = int() 112 [ret, procedure_type] = self.frame_obj.GetDesignProcedure(frame_name, procedure_type) 113 handle(ret) 114 return eFrameDesignProcedure(procedure_type)
Retrieves the design procedure for a frame object.
Parameters
- frame_name: name of the frame object
Returns
A value from the eFrameDesignProcedure enumeration
117 def get_group_assign(self, name : str) -> list[str]: 118 """Retrieves the groups to which a frame object is assigned. 119 120 :param name: name of an existing frame object 121 :type name: str 122 :return: names of the groups to which the frame object is assigned 123 :rtype: list[str] 124 """ 125 number_groups = int() 126 groups = [str()] 127 [ret, number_groups, groups] = self.frame_obj.GetGroupAssign(name, number_groups, groups) 128 handle(ret) 129 return list(groups)
Retrieves the groups to which a frame object is assigned.
Parameters
- name: name of an existing frame object
Returns
names of the groups to which the frame object is assigned
132 def get_GUID(self, frame_name : str) -> str: 133 """Retrieves the GUID(Global Unique ID) for the specified frame object. 134 135 :param frame_name: name of the frame object 136 :type frame_name: str 137 :return: the GUID of the specified frame object 138 :rtype: str 139 """ 140 guid = str() 141 [ret, guid] = self.frame_obj.GetGUID(frame_name, guid) 142 handle(ret) 143 return guid
Retrieves the GUID(Global Unique ID) for the specified frame object.
Parameters
- frame_name: name of the frame object
Returns
the GUID of the specified frame object
146 def get_label_from_name(self, frame_name : str) -> FrameObjectLabelData: 147 """Retrieves the label and story for a unique frame object name. 148 :param frame_name: name of the frame object 149 :type frame_name: str 150 :return: label and story of frame object name 151 :rtype: `FrameObjectLabelData` 152 """ 153 frame_label = str() 154 frame_story = str() 155 [ret, frame_label, frame_story] = self.frame_obj.GetLabelFromName(frame_name, frame_label, frame_story) 156 handle(ret) 157 return {'frame_name': frame_name, 158 'frame_label': frame_label, 159 'frame_story': frame_story}
Retrieves the label and story for a unique frame object name.
Parameters
- frame_name: name of the frame object
Returns
label and story of frame object name
165 def get_name_list(self) -> list[str]: 166 """Retrieves the names of all defined frame objects. 167 168 :return: frame object names 169 :rtype: list[str] 170 """ 171 number_names = int() 172 frame_names = [str()] 173 [ret, number_names, frame_names] = self.frame_obj.GetNameList(number_names, frame_names) 174 handle(ret) 175 return list(frame_names)
Retrieves the names of all defined frame objects.
Returns
frame object names
178 def get_name_list_on_story(self, story_name : str) -> list[str]: 179 """Retrieves the names of the defined frame objects on a given story. 180 181 :param story_name: name of an existing story 182 :type story_name: str 183 :return: frame object names on existing story 184 :rtype: list[str] 185 """ 186 number_names = int() 187 frame_names = [str()] 188 [ret, number_names, frame_names] = self.frame_obj.GetNameListOnStory(story_name, number_names, frame_names) 189 handle(ret) 190 return list(frame_names)
Retrieves the names of the defined frame objects on a given story.
Parameters
- story_name: name of an existing story
Returns
frame object names on existing story
193 def set_group_assign(self, name : str, group_name : str, remove : bool = False, item_type: etabs.eItemType = etabs.eItemType.Objects) -> None: 194 """Adds or removes frame objects from a specified group. 195 196 :param name: name of an existing frame object or group depending on the value of item_type 197 :type name: str 198 :param group_name: name of an existing group to which the assignment is made 199 :type group_name: str 200 :param remove: `True` for add, False for remove, defaults to `False` 201 :type remove: bool, optional 202 :param item_type: 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` 203 :type item_type: eItemType, optional 204 """ 205 handle(self.frame_obj.SetGroupAssign(name, group_name, remove, item_type))
Adds or removes frame objects from a specified group.
Parameters
- name: name of an existing frame object or group depending on the value of item_type
- group_name: name of an existing group to which the assignment is made
- remove:
True
for add, False for remove, defaults toFalse
- item_type: 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 toeItemType.Objects