10-26-2012 10:21 AM
Hi,
I have recently installed the NI-RFSG driver package 1.8.5 and RFSG .NET API 1.0.0 but can't find any help file or documentation.
In the start menu: /All Programs/National Instruments/NI-RFSG/Documentation there is a link "RFSG .NET API Help" but that only takes me to a file-not-found page on MSDN. I have also tried searching the national instruments home page to no avail. Is there any searchable help file or documentation available anywhere?
I am using Measurement Studio 2010 SP1 and I am trying to access some Self- and External Calibration attributes on my NI-5650. I haven't figured out how to do it by looking through the .NET dll. Is there anything like the GetAttribute functions listed in the C programming reference where I can access any attribute of my choosing?
Thanks,
Viktor
Solved! Go to Solution.
10-28-2012 11:35 PM
Hi,
To view NI-Rfsg .NET help, you must install the Microsoft Developer Network (MSDN) documentation for Visual Studio 2010 and later, and configure it before you install the NI-Rfsg .NET help.
If you have not done this, you can work around. You can install MSDN help and then use the Help Configuration Utility to reinstall the NI-Rfsg .NET help. For instructions and more details please go through "Installation Notes for Integrated Visual Studio 2010 Help" section in the Readme.
Please let me know if you still cannot find the documentation, after following the instructions.
There is a GetAttribute equivalent in .NET. I have pasted some sample code below.
// Create a Rfsg Session
NIRfsg _sampleRfsgSession = new NIRfsg(resourceNameComboBox.Text, true, true);
// Use advanced property access to set the values into the driver
IServiceProvider iServiceProviderInterface = _sampleRfsgSession as IServiceProvider;
AdvancedPropertyAccessService advancedPropertyAccessService = (AdvancedPropertyAccessService)iServiceProviderInterface.GetService(typeof(AdvancedPropertyAccessService));
// get the attribute
int attributeValue = advancedPropertyAccessService.GetAttributeInteger(attributeIdentifier);
Go through "AdvancedPropertyAccess" example for complete program.
10-29-2012 04:33 AM - edited 10-29-2012 04:33 AM
Thanks for the reply!
MSDN documentation is installed and when I use the Visual Studio Help Library Manager I can see that NINETRfsg is installed under the Measurement Studio heading.
I still can't open it though, when I try I get an error message that HelpLibAgent.exe has encountered a problem. A HTML page then opens and displays, among other things, the error message:
The following .NET class library is available with installation of the NI-RFSG driver:
This topic is not included in the Measurement Studio edition that you installed.
Thanks for the instructions for the AdvancePropertyAccessService. Using that I will be access the properties I needed for the moment, but it would still be nice to get the help-file running somehow.
Thanks,
Viktor
10-30-2012 05:16 AM
Hi Viktor,
From a Visual Studio Rfsg example, could you press F1 from any of the Rfsg types and check if Visual Studio help for that type opens up. If this works then you can then navigate to any other function in the API from there.
Thanks,
Raghavendra
10-31-2012 05:13 AM
Thanks, I am able to open the help file from within Visual Studio, but can't use the installed link in the menu ~start/all programs/national instruments/ni-rfsg/documentation. But that's ok.