01-12-2017 11:02 PM
Hi all,
In my application, I need to change the property of a control(The control might be present in other VI) often. But the property that has to be changed will be varying depending on soome other conditions. The inputs will be a control reference and an array of properties. How can I use a property node to modify itself depending on the property that we need to change?
I have attached a snippet of how I am using now. That has a case structure with lots of cases. Will I be able to use the same kind of functionality without Case Structures? A kind of Property node which will modify depending on the input.
Note: I will be using this in LabVIEW Development Engine. So solutions using scripting nodes are also acceptable. 🙂
Solved! Go to Solution.
01-13-2017 08:10 AM
@Anirudhan wrote:
Hi all,
...How can I use a property node to modify itself depending on the property that we need to change?
...
I can not get my head around what you could be asking. Please clarify.
On the off chance you may be asking about shomething I have already written about, take a look at this nugget about using control references. It may give yo usome inspiration.
Ben
01-13-2017 08:29 AM
There is no way to do what you are asking for. What you are showing is the best way.
The problem with coming up with another way is that each property had different types of data it would take. Right now you show a string constant in one case, a boolean constant in another. If this was a dynamically selected property, you can't have two different types of wire. The "value" input to that node would have to be a variant. But if you put the wrong type of property into a variant (like if you wired a string constant to the "value" property of this special node when the "property" input was set to "visible", then what should happen? The special node would have to raise an error.
Perhaps what you are asking for could be done if LabVIEW was changed. Suggest it on the LabVIEW Idea Exchange.
Maybe there is even a hidden, backdoor way to do it now.
But I think the way you are showing is the best way to handle it, and probably the only way.
01-16-2017 01:13 AM
Hi RavensFan,
While searching a solution for getting a particular property of a control dynamically, we came through an invoke node 'Get Property' by enabling the hidden properties in LabVIEW. This node will dynamically give the property value of the control depending on the input index. I have attached the snapshot of the invoke node.
The index values are large with the minimum index as 103970816. We get the property value for these index, but we are not sure what that property is. To clarify, let me give an example. For index 103970820, we get the property value as 'TRUE'. But we are not sure whether it is the value for 'Visible?' or 'Is in Block Diagram?' or something else. So we are searching for look-up table or a manual from which we can map the index with the corresponding property.
If anyone knows about this node or has any reference material for getting property index mapping, please help us out. Thanks in advance. 🙂
01-16-2017 03:27 AM
Haven't had need for it myself, but this should help - http://forums.ni.com/t5/LabVIEW/Property-Indices-for-quot-Get-Property-quot-method/m-p/1519512#M5671...
01-16-2017 06:46 AM
Thank you so much for looking into the issue. I think I can proceed with the ideas you all gave. 🙂
01-16-2017 08:27 AM