01-18-2012 03:58 AM
Hi,
Am new to this development of Automating veristand using .NET
So far have managed to Run project, Deploy, Get workspace, aliases, channels, RunStimulus Profile, Reading its state, Reading the result/log.
Currently struggling to get list of Profiles listed in the Project/Project explorer.
Can someone point me to how can I get list of available profiles in the current opened project.
Thanks.!
01-20-2012 08:50 AM
There isn't an API available to do this. We have APIs for automating project actions, such as opening, closing, running, etc. But we don't have APIs available for reading project contents.
However, the project file itself (*.nivsproj) is an XML file. You could use the XML tools provided in LabVIEW to read the file and look for specific tags representing the sequence files.
I'd start by opening your project file in a text editor to see its contents. (I'd recommend Notepad++, since it's free and has a lot of cool features.) Look for the item you'd want to find. A few things to take note of:
GUID: This uniquely identifies the type of the node in the tree. Make note of this value for the profile listed in the project, because it will make it easy to search for all such profiles.
Path property: This defines where the file is located on disk. Pay attention to the DependentFile Type attribute, which will help you resolve this path. If it says Relative, that means relative to the project location. It might also say To Common Doc Dir, which would mean relative to the public documents folder on your machine.
Hope this helps!