AnsweredAssumed Answered

E5071C VNA - IVI Drivers & Constructors

Question asked by fsuco on Jan 11, 2011
I have a question about constructors.  Take a look at the below code:
private void btnSPar_Click(object sender, EventArgs e)

{

//Button to control Network Analyzer

AgilentNAClass NA5071C = new AgilentNAClass();

NA5071C.Initialize("MyVNA", false, false, "");

NA5071C.IO.WriteString(":SYST:PRES");

NA5071C.IO.WriteString(":MMEM:LOAD 'D:STATE01.STA'");

AgilentNAMeasurementClass SPARM = new AgilentNAMeasurementClass();

NA5071C.Close();

}

Both the AgilentNAClass and AgilentNaMeasurementClass are part of the AgilentNaLib reference drivers to control the network analyzer. That library has a number of classes & methods to control and take measurements with instrument.

My problem is with the line of code "AgilentNAMeasurementClass SPARM = new AgilentNAMeasurementClass();" As it gives me the error "Error 1 The type 'Agilent.AgilentNA.Interop.AgilentNAMeasurementClass' has no constructors defined."

I'm not quite sure how to get over this hurdle. Any guidance?  

Outcomes