Retrieve load pattern data from the model. Args: model: SAP2000 SapModel object Returns: `0` if successful.
(self, model)
| 139 | return com_ret(result) |
| 140 | |
| 141 | def _get(self, model) -> int: |
| 142 | """ |
| 143 | Retrieve load pattern data from the model. |
| 144 | |
| 145 | Args: |
| 146 | model: SAP2000 SapModel object |
| 147 | |
| 148 | Returns: |
| 149 | `0` if successful. |
| 150 | """ |
| 151 | # Get the load pattern type. |
| 152 | result = model.LoadPatterns.GetLoadType(self.name, 0) |
| 153 | try: |
| 154 | self.load_type = LoadPatternType(com_data(result, 0, 0)) |
| 155 | except ValueError: |
| 156 | self.load_type = LoadPatternType.OTHER |
| 157 | ret1 = com_ret(result) |
| 158 | |
| 159 | # Get the self-weight multiplier. |
| 160 | result = model.LoadPatterns.GetSelfWtMultiplier(self.name, 0.0) |
| 161 | self.self_weight_multiplier = com_data(result, 0, 0.0) |
| 162 | ret2 = com_ret(result) |
| 163 | |
| 164 | return 0 if ret1 == 0 and ret2 == 0 else -1 |
| 165 | |
| 166 | def _delete(self, model) -> int: |
| 167 | """ |