03-13-2013 01:49 PM
I am trying to use VS API to add folders and channels to the Reflective Memory section of an existing system def file. I can't seem to see the existing folders and channels or add new ones. I have attached a code snipit and the code. Please tell me what I am doing wrong and point me in the right direction. I am new to the API programming and have been doing a lot of trial and error.
Thanks!!
Josh
Solved! Go to Solution.
03-13-2013 06:59 PM
I think I got this working and wanted to post the results. If there is a better way to do this please let me know. I realize that I don't do a good job at closing the references, but this was just for proof of concept for me.
I can't seem to insert the PNG, so I attached it.
03-14-2013 11:17 AM
Hi Josh,
I think you have the basic Idea. It looks like there is a good bit of code that you can cut out and still run correctly. Having lots of property nodes is pretty typical of using this API. It is very similar to using scripting in LabVIEW. There are lots and lots of layers to dig through, but that is one reason it is so powerful.
Cheers,
Ryan
Applications Enigneer
03-15-2013 08:21 AM
You can simplify this some:
03-15-2013 10:17 AM
Hi StephenB,
Thanks for the great suggestion and example. I had never heard of dotted properties, so I learned something new and useful. I did try the find node and casting, but could not get it to work, but I will try it again based on your example ( I assume the .net ref is of the ReflectiveMemoryDataChannels type). Thanks for the support, I really appreciate it!!!
-JoshE