@@ -8,23 +8,30 @@ def __init__(self):
88 self ._load = self ._staad .Load
99
1010 self ._functions = [
11- "AddMemberConcForce" ,
12- "AddResponseSpectrumLoadEx" ,
13- "AddSelfWeightInXYZ" ,
14- "AddWindDefinition" ,
15- "ClearPrimaryLoadCase" ,
16- "CreateNewPrimaryLoad" ,
17- "CreateNewReferenceLoad" ,
18- "DeleteDirectAnalysisDefinition" ,
19- "DeleteDirectAnalysisDefinitionParameter" ,
20- "DeleteWindDefinition" ,
21- "GetLoadCaseTitle" ,
22- "GetReferenceLoadCaseCount" ,
23- "SetLoadActive" ,
24- "SetReferenceLoadActive" ,
25- "AddNodalLoad" ,
26- "ClearReferenceLoadCase"
27- ]
11+ "AddMemberConcForce" ,
12+ "AddNodalLoad" ,
13+ "AddResponseSpectrumLoadEx" ,
14+ "AddSelfWeightInXYZ" ,
15+ "AddWindDefinition" ,
16+ "ClearPrimaryLoadCase" ,
17+ "ClearReferenceLoadCase" ,
18+ "CreateNewPrimaryLoad" ,
19+ "CreateNewReferenceLoad" ,
20+ "DeleteDirectAnalysisDefinition" ,
21+ "DeleteDirectAnalysisDefinitionParameter" ,
22+ "DeletePrimaryLoadCases" ,
23+ "DeleteWindDefinition" ,
24+ "GetLoadCombinationCaseCount" ,
25+ "GetLoadCombinationCaseNumbers" ,
26+ "GetLoadCaseTitle" ,
27+ "GetLoadListCount" ,
28+ "GetLoadType" ,
29+ "GetPrimaryLoadCaseCount" ,
30+ "GetReferenceLoadCaseCount" ,
31+ "GetReferenceLoadCaseNumbers" ,
32+ "SetLoadActive" ,
33+ "SetReferenceLoadActive"
34+ ]
2835
2936 for function_name in self ._functions :
3037 self ._load ._FlagAsMethod (function_name )
@@ -42,6 +49,15 @@ def make_safe_array_long(array):
4249
4350 return self ._load .AddMemberConcForce (varBeamNo ,varDirection ,varForce ,varD1 ,varD2 )
4451
52+ def AddNodalLoad (self , nodes : list [int ], fx : float , fy :float , fz :float , mx :float , my :float , mz :float ):
53+ def make_safe_array_long (array ):
54+ return automation ._midlSAFEARRAY (ctypes .c_long ).create (array )
55+
56+ safe_list = make_safe_array_long (nodes )
57+ varNodeNo = make_variant_vt_ref (safe_list , automation .VT_ARRAY | automation .VT_I4 )
58+
59+ self ._load .AddNodalLoad (varNodeNo ,fx , fy , fz , mx , my , mz )
60+
4561 def AddResponseSpectrumLoadEx (self , code_number :int , modal_combination :int , set_names_1 :list , set_values_1 :list , spectrum_data_pairs :list [tuple ],set_names_2 :list = None , set_values_2 :list = None ):
4662 """Adds Response Spectrum load item to the currently active load case.
4763
@@ -102,6 +118,9 @@ def ClearPrimaryLoadCase(self,load_case:int,is_reference_lc:bool=False):
102118 """
103119 return self ._load .ClearPrimaryLoadCase (load_case ,is_reference_lc )
104120
121+ def ClearReferenceLoadCase (self ,reference_load_number : int ):
122+ self ._load .ClearReferenceLoadCase (reference_load_number )
123+
105124 def CreateNewPrimaryLoad (self ,LoadTitle :str = "LOAD CASE X" ):
106125 """
107126 Creates new PRIMARY load case.
@@ -128,6 +147,9 @@ def DeleteDirectAnalysisDefinitionParameter(self,parameter_type:int=0):
128147 """
129148 return self ._load .DeleteDirectAnalysisDefinitionParameter (parameter_type )
130149
150+ def DeletePrimaryLoadCases (self ,load_case :int ,is_reference :bool = False ):
151+ return self ._load .DeletePrimaryLoadCases (load_case ,is_reference )
152+
131153 def DeleteWindDefinition (self ,type_No :int = 0 ):
132154 """
133155 Deletes Wind definition. All definitions will be deleted if this input is set as 0.
@@ -140,6 +162,42 @@ def GetLoadCaseTitle(self,lc:int=0):
140162 """
141163 return self ._load .GetLoadCaseTitle (lc )
142164
165+ def GetLoadCombinationCaseCount (self ):
166+ """
167+ Gets total number of combination load case(s) present in the current structure.
168+ """
169+ return self ._load .GetLoadCombinationCaseCount ()
170+
171+ def GetLoadCombinationCaseNumbers (self ):
172+ """
173+ Gets all load combination case number(s).
174+ """
175+ lc_case_count = self ._load .GetLoadCombinationCaseCount ()
176+ safe_list = make_safe_array_long (lc_case_count )
177+ lista = make_variant_vt_ref (safe_list , automation .VT_ARRAY | automation .VT_I4 )
178+
179+ self ._load .GetLoadCombinationCaseNumbers (lista )
180+
181+ return (lista [0 ])
182+
183+ def GetLoadListCount (self ):
184+ """
185+ Gets the number of existing load list(s)
186+ """
187+ return self ._load .GetLoadListCount ()
188+
189+ def GetLoadType (self ,load_No :int ):
190+ """
191+ Returns primary load case category(s) as an long value.
192+ """
193+ return self ._load .GetLoadType (load_No )
194+
195+ def GetPrimaryLoadCaseCount (self ):
196+ """
197+ Returns the total number of primary load cases present in the current structure.
198+ """
199+ return self ._load .GetPrimaryLoadCaseCount ()
200+
143201 def GetReferenceLoadCaseCount (self ):
144202 """
145203 Returns the number of reference load case defined in Reference Load Definitions.
@@ -158,17 +216,7 @@ def SetReferenceLoadActive(self,load_case:int):
158216 """
159217 return self ._load .SetReferenceLoadActive (load_case )
160218
161- def AddNodalLoad (self , nodes : list [int ], fx : float , fy :float , fz :float , mx :float , my :float , mz :float ):
162- def make_safe_array_long (array ):
163- return automation ._midlSAFEARRAY (ctypes .c_long ).create (array )
164-
165- safe_list = make_safe_array_long (nodes )
166- varNodeNo = make_variant_vt_ref (safe_list , automation .VT_ARRAY | automation .VT_I4 )
167-
168- self ._load .AddNodalLoad (varNodeNo ,fx , fy , fz , mx , my , mz )
169-
170- def ClearReferenceLoadCase (self ,reference_load_number : int ):
171- self ._load .ClearReferenceLoadCase (reference_load_number )
219+
172220
173221
174222
0 commit comments