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

Method get_count

loading/load_case.py:245–259  ·  view source on GitHub ↗

Get the number of load cases. Args: model: SAP2000 SapModel object case_type: Optional case type filter Returns: Load case count.

(model, case_type: Optional[LoadCaseType] = None)

Source from the content-addressed store, hash-verified

243
244 @staticmethod
245 def get_count(model, case_type: Optional[LoadCaseType] = None) -> int:
246 """
247 Get the number of load cases.
248
249 Args:
250 model: SAP2000 SapModel object
251 case_type: Optional case type filter
252
253 Returns:
254 Load case count.
255 """
256 if case_type is None:
257 return model.LoadCases.Count()
258 else:
259 return model.LoadCases.Count(int(case_type))
260
261 @staticmethod
262 def get_name_list(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected