LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically select a property

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

0 Kudos
Message 1 of 7
(3,375 Views)

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.

0 Kudos
Message 2 of 7
(3,351 Views)

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


___________________
Try to take over the world!
0 Kudos
Message 3 of 7
(3,338 Views)

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

0 Kudos
Message 4 of 7
(3,327 Views)

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?

 

0 Kudos
Message 5 of 7
(3,310 Views)

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.


___________________
Try to take over the world!
0 Kudos
Message 6 of 7
(3,296 Views)

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.

0 Kudos
Message 7 of 7
(3,285 Views)