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

Method get_by_name

loading/load_pattern.py:260–275  ·  view source on GitHub ↗

Get a load pattern by name. Args: model: SAP2000 SapModel object name: Load pattern name Returns: `LoadPattern` instance, or `None` if it does not exist.

(cls, model, name: str)

Source from the content-addressed store, hash-verified

258
259 @classmethod
260 def get_by_name(cls, model, name: str) -> Optional["LoadPattern"]:
261 """
262 Get a load pattern by name.
263
264 Args:
265 model: SAP2000 SapModel object
266 name: Load pattern name
267
268 Returns:
269 `LoadPattern` instance, or `None` if it does not exist.
270 """
271 lp = cls(name=name)
272 ret = lp._get(model)
273 if ret == 0:
274 return lp
275 return None
276
277 @classmethod
278 def get_all(cls, model) -> List["LoadPattern"]:

Callers 1

get_allMethod · 0.45

Calls 1

_getMethod · 0.45

Tested by

no test coverage detected