From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Property Node - Development Engine

Solved!
Go to solution

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.

NI_forum.png

Note: I will be using this in LabVIEW Development Engine. So solutions using scripting nodes are also acceptable. 🙂 

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

@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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 7
(3,757 Views)

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.

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

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. 🙂

Download All
0 Kudos
Message 4 of 7
(3,724 Views)
Solution
Accepted by topic author Anirudhan

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...


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

Thank you so much for looking into the issue. I think I can proceed with the ideas you all gave. 🙂

0 Kudos
Message 6 of 7
(3,699 Views)

dyn prop.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 7 of 7
(3,687 Views)