@@ -478,6 +478,12 @@ public static byte[] get_int8_array(ref IntPtr resultPtr, int resultCount)
478478 [ DllImport ( "dss_capi" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
479479 public static extern int Circuit_SetActiveElement ( [ param: MarshalAs ( UnmanagedType . LPStr ) ] string FullName ) ;
480480
481+ [ DllImport ( "dss_capi" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
482+ public static extern void Circuit_SetCktElementName ( [ param: MarshalAs ( UnmanagedType . LPStr ) ] string FullName ) ;
483+
484+ [ DllImport ( "dss_capi" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
485+ public static extern void Circuit_SetCktElementIndex ( int idx ) ;
486+
481487 [ DllImport ( "dss_capi" , CallingConvention = CallingConvention . Cdecl , CharSet = CharSet . Ansi ) ]
482488 public static extern double Circuit_Capacity ( double Start , double Increment ) ;
483489
@@ -10872,6 +10878,47 @@ public class Circuit
1087210878 public /*static*/ Vsources Vsources = new dss_sharp . Vsources ( ) ;
1087310879 public /*static*/ LineCodes LineCodes = new dss_sharp . LineCodes ( ) ;
1087410880
10881+
10882+ /// <summary>
10883+ /// Activates and returns a bus by its (zero-based) index.
10884+ /// </summary>
10885+ public Bus get_Buses ( int idx )
10886+ {
10887+ if ( OpenDSS . Lib . Circuit_SetActiveBusi ( idx ) < 0 )
10888+ return null ;
10889+
10890+ return this . ActiveBus ;
10891+ }
10892+
10893+ /// <summary>
10894+ /// Activates and returns a bus by its name.
10895+ /// </summary>
10896+ public Bus get_Buses ( string name )
10897+ {
10898+ if ( OpenDSS . Lib . Circuit_SetActiveBus ( Name ) < 0 )
10899+ return null ;
10900+
10901+ return this . ActiveBus ;
10902+ }
10903+
10904+ /// <summary>
10905+ /// Activates and returns a CktElement by its global (zero-based) index.
10906+ /// </summary>
10907+ public CktElement get_CktElements ( int idx )
10908+ {
10909+ OpenDSS . Lib . Circuit_SetCktElementIndex ( idx ) ;
10910+ return this . ActiveCktElement ;
10911+ }
10912+
10913+ /// <summary>
10914+ /// Activates and returns a CktElement by its full name (e.g. "load.abc").
10915+ /// </summary>
10916+ public CktElement get_CktElements ( string fullName )
10917+ {
10918+ OpenDSS . Lib . Circuit_SetCktElementName ( Name ) ;
10919+ return this . ActiveCktElement ;
10920+ }
10921+
1087510922 public /*static*/ double Capacity ( double Start , double Increment )
1087610923 {
1087710924 return OpenDSS . Lib . Circuit_Capacity ( Start , Increment ) ;
0 commit comments