LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
cancel
Showing results for 
Search instead for 
Did you mean: 

Make the All Supported Properties property return nested properties

Status: New

The Property class, which represents the property node, has a property called All Supported Properties which ideally would show all the properties supported by the class the property node is linked to.

 

The problem is that it doesn't. If you have nested properties which come from another class (for example, the properties for the caption which can be selected by opening the pull right menu, as seen in the top image), those properties aren't returned when you call the property, and instead you just get the property for the caption reference, as seen in the bottom image, where the ControlIndex property is shown immediately after the Caption property.

 

NestedProps.png

 

 

Instead, I want either this property or a new property to return all of the nested properties as well, just like you get in the UI.

This would be useful for setting properties using scripting and alternate UIs (like this one or this one, which can't work today, because they can't get the full list of properties).

 

 

 


___________________
Try to take over the world!
7 Comments
Proven Zealot

There is a change of an endless loop of course.

 

For instance, "Label" has an "Owner". "Owner" should not be traversed, or we'll have an endless recursion. There might be less obvious recursion problems...

Knight of NI Knight of NI
Knight of NI

To be clear, the property should return everything that's in the selection menu. In the case of Label.Owner, it has no more levels in the menu, so there's no reason to return anything beyond that level.

 

nested.png


___________________
Try to take over the world!
Proven Zealot

@tst wrote:

In the case of Label.Owner, it has no more levels in the menu, so there's no reason to return anything beyond that level.


Yes, obviously. 😀🌴 (:facepalm:)

 

I wander though if this new property should replace the old one, or if both should exist? Or a Boolean input?

Active Participant

It's not immediately obvious, but the Long Name Localized cluster element of each property has a colon-delimited list of the property hierarchy (eg, "Bounds:Area Width"), so you can count the colons to get each item's nest depth in a tree.

_____________
Creator of the BundleMagic plugin for LabVIEW!
Knight of NI Knight of NI
Knight of NI

The problem with that is you need to have a property in the property node to be able to use that. While it would be possible (and ugly) to copy the node to a temporary VI and expand it there, it looks like the expansion doesn't set the nested properties in the node, so that still brings us back to the same point.


___________________
Try to take over the world!
Active Participant

I looked at your example more, and I agree that some nested elements are not available. But some are (consider Data Entry Limits). The discrepancy seems more like a bug than a missing feature. Frustrating indeed!

_____________
Creator of the BundleMagic plugin for LabVIEW!
Knight of NI Knight of NI
Knight of NI

Data Entry Limits, as well as others, are clusters. They are made up of subelements, but they are all fully owned by the object the property node is linked to (a numeric, in your example).

 

The items that don't appear in the list are those which are owned by subobjects, such as the label or caption. The Caption property itself appears in the list, as shown in the original screenshot, but that just returns the top level property, which is the reference to the subobject. It doesn't return all of the properties owned by the subobject itself.


___________________
Try to take over the world!