02-23-2012 05:38 AM
Is there a way to get the list of all targets in a setup using the .net API?
I checked the help for 2010 and 2011, nothing.
Alternatively, is there a way to check, if a specific target is present?
(Our goal is to help the user with better diagnostic to setup valid connections to VeriStand
Thanks for your help,
- AJ
Solved! Go to Solution.
02-23-2012 09:59 AM
Hi AJ,
Yes, you can use the System Definition API to get a list of all targets in your sysdef, as well as their properties. You can then use an RT Utility VI to get information about whether a target is up and running.
You can find documentation for the System Definition API in the NI VeriStand 2011 help.
I have attached a simple example of how to do this. You'll probaly want to add some better error checking to it, but hopefully it gets the idea across.
Regards,
02-23-2012 11:55 AM
It has come to my attention that you may not be using LabVIEW, so I have attached a screenshot of the code. The NI VeriStand .NET API calls will be the same regardless of your calling environment, so you should be able to translate the code below to C++. The only thing I'm unsure of is how to get the target information from C++. It might be possible to use the System Configuration API to get this information, but I have no experience using it outside of LabVIEW.
02-23-2012 02:03 PM
sorry, I am in the wrong forum... trying again in the correct one...
- AJ