@@ -11,48 +11,58 @@ class IMeters(Base):
1111
1212 def CloseAllDIFiles (self ):
1313 self ._lib .Meters_CloseAllDIFiles ()
14+ self .CheckForError ()
1415
1516 def DoReliabilityCalc (self , AssumeRestoration ):
1617 self ._lib .Meters_DoReliabilityCalc (AssumeRestoration )
18+ self .CheckForError ()
1719
1820 def OpenAllDIFiles (self ):
1921 self ._lib .Meters_OpenAllDIFiles ()
22+ self .CheckForError ()
2023
2124 def Reset (self ):
2225 self ._lib .Meters_Reset ()
26+ self .CheckForError ()
2327
2428 def ResetAll (self ):
2529 self ._lib .Meters_ResetAll ()
30+ self .CheckForError ()
2631
2732 def Sample (self ):
2833 self ._lib .Meters_Sample ()
34+ self .CheckForError ()
2935
3036 def SampleAll (self ):
3137 self ._lib .Meters_SampleAll ()
38+ self .CheckForError ()
3239
3340 def Save (self ):
3441 self ._lib .Meters_Save ()
42+ self .CheckForError ()
3543
3644 def SaveAll (self ):
3745 self ._lib .Meters_SaveAll ()
46+ self .CheckForError ()
3847
3948 def SetActiveSection (self , SectIdx ):
4049 self ._lib .Meters_SetActiveSection (SectIdx )
50+ self .CheckForError ()
4151
4252 @property
4353 def AllBranchesInZone (self ):
4454 '''(read-only) Wide string list of all branches in zone of the active energymeter object.'''
45- return self ._get_string_array (self ._lib .Meters_Get_AllBranchesInZone )
55+ return self ._get_string_array (self .CheckForError ( self . _lib .Meters_Get_AllBranchesInZone ) )
4656
4757 @property
4858 def AllEndElements (self ):
4959 '''(read-only) Array of names of all zone end elements.'''
50- return self ._get_string_array (self ._lib .Meters_Get_AllEndElements )
60+ return self ._get_string_array (self .CheckForError ( self . _lib .Meters_Get_AllEndElements ) )
5161
5262 @property
5363 def AllNames (self ):
5464 '''(read-only) Array of all energy Meter names'''
55- return self ._get_string_array (self ._lib .Meters_Get_AllNames )
65+ return self ._get_string_array (self .CheckForError ( self . _lib .Meters_Get_AllNames ) )
5666
5767 @property
5868 def AllocFactors (self ):
@@ -69,7 +79,7 @@ def AllocFactors(self, Value):
6979 @property
7080 def AvgRepairTime (self ):
7181 '''(read-only) Average Repair time in this section of the meter zone'''
72- return self ._lib .Meters_Get_AvgRepairTime ()
82+ return self .CheckForError ( self . _lib .Meters_Get_AvgRepairTime () )
7383
7484 @property
7585 def CalcCurrent (self ):
@@ -168,7 +178,7 @@ def Next(self):
168178 @property
169179 def NumSectionBranches (self ):
170180 '''(read-only) Number of branches (lines) in this section'''
171- return self ._lib .Meters_Get_NumSectionBranches ()
181+ return self .CheckForError ( self . _lib .Meters_Get_NumSectionBranches () )
172182
173183 @property
174184 def NumSectionCustomers (self ):
@@ -183,7 +193,7 @@ def NumSections(self):
183193 @property
184194 def OCPDeviceType (self ):
185195 '''(read-only) Type of OCP device. 1=Fuse; 2=Recloser; 3=Relay'''
186- return self ._lib .Meters_Get_OCPDeviceType ()
196+ return self .CheckForError ( self . _lib .Meters_Get_OCPDeviceType () )
187197
188198 @property
189199 def Peakcurrent (self ):
0 commit comments