AnsweredAssumed Answered

unable to get a handle to GCA Object with C#

Question asked by deq on Feb 18, 2019
Latest reply on Feb 19, 2019 by deq

        After creating "GCA" measurements successfully with  PNA-x N5242A rev A.10.64.09,   But failed to get GCA handle. The code is listed here:

           Type  pnaType = Type.GetTypeFromProgID("AgilentPNA835x.Application", "N5242A");
            AgilentPNA835x.Application  pna= (AgilentPNA835x.Application) Activator.CreateInstance(pnaType);

           //create an "Gain Compress" object with measurement "CompOut21" on Channel 1.   successfully in next line.

             AgilentPNA835x.IMeasurement  cust_meas = pna.CreateCustomMeasurementEx(1, "Gain Compression", "CompOut21", 1);
            // Get current channel.

            AgilentPNA835x.IChannel  chan=  pna.ActiveChannel;

          // to change GCA default settings, need to get GCA handle from IChannel in the next line.
            AgilentPNA835x.IGainCompression  gca =chan.CustomChannelConfiguration()


          The question is : CustomChannelConfiguration() property is not visible for current Channel interface  "chan" object though we can find  CustomChannelConfiguration propriety  of AgilentPNA835x.Channelclass from Object Browser.