Subscribing is a smart move!
You can subscribe to this forum after you log in or create your free account.
Geo SCADA Knowledge Base
Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.
Originally published on Geo SCADA Knowledge Base by sbeadle1 | June 10, 2021 01:00 AM
string sSystem = "MAIN";string sUid = "Eng";string sPwd= "";// Define the server object and create a new instance of itScxV6DbClient.ScxV6Server objServer = new ScxV6DbClient.ScxV6Server();// Connect to the serverobjServer.Connect(sSystem, sUid, sPwd);// Define the object and create a new internal analog pointScxV6DbClient.ScxV6Object obj = objServer.CreateObject("CPointAlgManual", "$Root");
// Get objectScxV6DbClient.ScxV6Object O = S.FindObject( "New Analogue Point" );// The line below doesn't work because Interface is declared in the IDL as a vanilla IDispatch, instead we need to use late-binding via Reflection// O.Interface.LoadDataValues( Values, Times, Qualities );// Instead, use reflection:// Get the Historic aggregateobject Historic = O.Interface.GetType().InvokeMember( "Historic", System.Reflection.BindingFlags.GetProperty, null,O.Interface,null );// Invoke the LoadDataValues methodif ( Historic != null ) Historic.GetType().InvokeMember( "LoadDataValues", System.Reflection.BindingFlags.InvokeMethod, null, Historic, new object[] { Values, Times, Qualities } );
Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.