11-13-2010 04:37 AM
Hello,
Is it possible to programmatically select a property for a FP object? Properties for which a value change is required are stored in a database (as are the values itself). I can't use a property node because the poperty to change is not fixed and the database can and will be extended in near future.
Thanks.
Jan
11-13-2010 09:01 AM
You could put all the possible property nodes you would be dealing with in a case structure and select them from there.
There is no other way I know of to do this. Because the datatype of the wire going into the wire has to be known in LabVIEW at the time of compilation, and different property nodes wouild require different types of data depending on which property you select, there would be no way for LabVIEW to allow you to programmatically select a property.
11-13-2010 10:04 AM
If you want to change existing properties, you would need to manually select each of the properties in code beforehand. Kshif's property saver might help you there:
http://www.kshif.com/lv/index.html
If you want to associate truly custom data, try using tags:
http://forums.ni.com/t5/LabVIEW/Darren-s-Weekly-Nugget-04-13-2009/m-p/888538#M401396
11-13-2010 01:09 PM
Thanks for your reply.
You are right about the datatype off course. I kind off hoped that for multilanguage VI's LabVIEW had a facility to programmatically select a String property of a FP object. I just realized that I didn't mention the fact that I am specifically interested in String properties. However, i don't think that this changes a lot.
Jan
11-13-2010 10:40 PM - edited 11-13-2010 10:43 PM
That looks to be a very powerful library of VI's that you have linked to tst.
It looks like they've basically enumerated all the possible properties for all the control types. They some tricky combination of names and tags and the properties saved as binary data and can parse the file they have to determine which VI's to run and which cases of all the case structures to execute to get to the appropriate property node.
I'm going to hold on to this library as it could be very helpful in the future.
I dug into the VI's to see how they were doing this. I came across a property node with a pink top bar instead of the usual yellow, and I've never seen this before. What does it mean?
11-14-2010 01:37 AM
The red bar means deprecated (which doesn't surprise me, as this toolkit is pretty old, and probably doesn't cover all of the controls and properties which exist today). The help for the relevant property should tell you what the replacement is. I'm guessing the reason for this in your case is the ActiveColNum property.
11-14-2010 10:25 AM
Thanks. That explains it. Actually it turns out CellFG is the property node that no longer exists in LV2010. It had no help in the context window, and deleting that property changed the node from pink back to yellow.
I learned something today. Thanks.