09-07-2009 11:24 AM
I'm evaluating VeriStand. I would like to build a managed C++ application and access parameters in example workspace that comes with Veristand.
As I understood that should be possible through .NET API. Where should be a good place to start?
I only found Veristand Execution VIs (http://zone.ni.com/reference/en-XX/help/372846A-01/TOC12.htm).
Is there any other API reference or maybe a sample application?
Solved! Go to Solution.
09-07-2009 02:18 PM
Hi I attached the doxygen documentation for the .net dll. Open the index.html to get the info.
The dll is registered into GAC, so you should be able to load it up.
The interface is built using a factory pattern, so to use it you just need to instantiate a factor class from the dll and get the needed interface.
I think the doxygen documentation should give you clear description on the parameters.
If you encounter difficulties using it let me know.
Thanks
Toga
09-08-2009 04:23 AM
I was expecting a component/dll to be shown in AddReference dialog in VS. After a while of searching I only found a (non registered) NationalInstruments.VeriStand.ServerAPI.dll under VeriStand installation which I could add as a reference.
After no sign of ClientAPI I fired up a GAC explorer which listed NationalInstruments.VeriStand.APIInterface and NationalInstruments.VeriStand.ClientAPI but I wasn't able to load it or create a reference to it.
Am I doing something wrong? What way of usage did you have in mind for using ClientAPI? Should there be a NationalInstruments.VeriStand.ClientAPI.dll on my machine? Is this maybe an evaluation period problem?
09-08-2009 02:04 PM
Hi enTelet, I look at the issue and found that MSVC does not automatically register all the dll that is in GAC. Which is unfortunate. I will make it a CAR to make the installer add the necessary components so MSVC can found the dll.
If you are interested in looking into how to add any dll from GAC to MSVC add reference list:
http://www.csharp411.com/adding-assemblies-to-the-visual-studio-add-reference-dialog/
I have attached a registry key export for you to use. You can just right click on the file and do merge, this should add the correct registry key.
Re-launch your MSVC now you should be able to add the reference to NationalInstruments.VeriStand.ClientAPI.dll
If you are interested to know the actual disk path of the dll it is in (I have tried both windows xp and window vista 32bit OS):
c:\windows\assembly\GAC_MSIL\NationalInstruments.VeriStand.ClientAPI\2.0.0.0__a26d690c380daa308
Let me know if this still does not work.
Also there is a small console app using manage c++ solution file. I just write a really simple app using msvc express edition, note that I am not a managed c++ guy, I am more fluent in c# so the syntax sort of throwing me off a bit. The example should still show you how to get an IWorkspace and get status of the NIVeriStand engine.
09-09-2009 07:03 AM
Thanks! It works now.
One more question... What about connecting to remote system with custom IP and port?
09-09-2009 09:24 AM
09-09-2009 11:22 AM
Can you describe your use case you are trying to solve with connecting to remove machine with different port ?
Thanks
Toga
09-11-2009 02:24 AM
I'm interested in using .NET API to connect to an instance of VeriStand running on another desktop PC.
Scenario is a remote test system. VeriStand would be one of test applications all controlled from same remote script.
09-12-2009 02:03 PM
CAR #186105 has been filed to address this issue.
09-12-2009 02:09 PM
Hi Entelet, ok the short answer is that we have no direct support for remote machine VeriStand access for now.
However there are workarounds that you can do depending on your test system configuration:
1. If you are actually running the configuration on multiple PXI-RT target, then you just create multiple rig files pointing to different PXI-RT target system. Now with the API you can run these different rig configuration to run test on these PXI-RT target from 1 PC.
2. If you are intending to remotely control different NI VeriStand on different Windows Desktop execution, you need to do a bit of custom work. Since you are already doing custom managed C++ application you can write a client .Net WCF layer that sits on our ClientAPI.dll this way you open up remote access to each individual Windows Desktop execution.
Toga