MCPcopy Create free account
hub / github.com/HeisenbergJY1/PySap2000 / _get

Method _get

loading/load_pattern.py:141–164  ·  view source on GitHub ↗

Retrieve load pattern data from the model. Args: model: SAP2000 SapModel object Returns: `0` if successful.

(self, model)

Source from the content-addressed store, hash-verified

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 """

Callers 3

test_set_load_typeMethod · 0.95
get_by_nameMethod · 0.45

Calls 3

com_dataFunction · 0.90
com_retFunction · 0.90
LoadPatternTypeClass · 0.85

Tested by 2

test_set_load_typeMethod · 0.76