paul_cardinale Posted December 10, 2018 Report Share Posted December 10, 2018 I want to set a property item in a Property node. For properties that have a single ID, I can get this method to work: For example, setting a property item for a Control property node to "Label" simply requires the ID string "6332005"; yielding: However many properties require more that one ID. For instance: requires "6332005" (Label), and "632d800" (text). I can't find a way to set a property item to a property that has such multiple levels. Does anyone know how to do this? Paul Cardinale Quote Link to comment
hooovahh Posted December 10, 2018 Report Share Posted December 10, 2018 Someone from NI can chime in, but I think this is not possible and is one of those limitations of LabVIEW Scripting. QuickDrop has a CTRL+Shift+B that operates on a property node and it has a limitation of not working with "dotted properties". I assume that's due to a limitation with LabVIEW's scripting otherwise NI would have supported it. Quote Link to comment
Darren Posted December 11, 2018 Report Share Posted December 11, 2018 Correct. Scripting does not support setting dotted properties. Quote Link to comment
Popular Post paul_cardinale Posted December 12, 2018 Author Popular Post Report Share Posted December 12, 2018 (edited) I found it! Unfortunately it's deprecated. It takes dotted inputs as either names or ID codes. Edited December 13, 2018 by paul_cardinale 4 1 1 Quote Link to comment
hooovahh Posted December 12, 2018 Report Share Posted December 12, 2018 Wow I never knew about that and the fact that it can handle dotted properties is awesome. Darren is there a reason we shouldn't be using this thing that does exactly what we might want when the proper method lacks this functionality? Quote Link to comment
Darren Posted December 12, 2018 Report Share Posted December 12, 2018 I had no idea this existed. I will look into it. 1 1 Quote Link to comment
Darren Posted January 11, 2019 Report Share Posted January 11, 2019 Thanks for digging this up, Paul. I got it to work for dotted properties of multiple levels (so not only Label.Text, but also things like Terminal.Wire.Terms[]). I'm going to try to update the VI Server Rename plugin for Quick Drop to allow setting dotted properties by using this deprecated property. (?) 1 Quote Link to comment
hooovahh Posted January 14, 2019 Report Share Posted January 14, 2019 So does that mean that this deprecated function is still semi-supported? I assume it was deprecated for a reason, is it unstable under any known circumstance? Quote Link to comment
Darren Posted January 21, 2019 Report Share Posted January 21, 2019 On 1/14/2019 at 8:45 AM, hooovahh said: So does that mean that this deprecated function is still semi-supported? I assume it was deprecated for a reason, is it unstable under any known circumstance? If I recall correctly, it was deprecated because the current property is more explicit about how you're assigning the property name (ID, short name, long name), whereas the deprecated property was more ambiguous (you could wire in any of them I think). But to my knowledge, there's no problem using the deprecated property. When I update the VI Server Rename plugin, I'll make sure to only call the deprecated property if there's a period in the specified property name. Quote Link to comment
Sparkette Posted January 29, 2019 Report Share Posted January 29, 2019 Does this mean its deprecated status will be removed? Also Paul, just wondering, how did you find that property? Quote Link to comment
Darren Posted January 30, 2019 Report Share Posted January 30, 2019 19 hours ago, flarn2006 said: Does this mean its deprecated status will be removed? Not in 2019. But we will look into consolidating the API in 2020 so the non-deprecated method is able to set dotted properties like the deprecated property can. Quote Link to comment
paul_cardinale Posted February 26, 2019 Author Report Share Posted February 26, 2019 A long time ago (maybe around LV 7) I created a VI that was just a set of property nodes: One for every class (that I knew of), each node having every possible property. I think that when I created it, that property wasn't deprecated. All_Methods.vi All_Properties.vi 1 Quote Link to comment
Yair Posted December 18, 2019 Report Share Posted December 18, 2019 Darren, any chance of getting the All Supported Properties property of the Property class (i.e. the property node) to actually return all the supported properties for the current class of the property node, including all of the nested ones? As it is today, that property only returns the top level properties (so it would show a Label property if the node is linked to a class inheriting from Control, but not all the subproperties coming from the Label class). If that's too hard for support reasons, maybe at least adding a new property which will actually return all of them? Quote Link to comment
Darren Posted December 18, 2019 Report Share Posted December 18, 2019 6 hours ago, Yair said: Darren, any chance of getting the All Supported Properties property of the Property class (i.e. the property node) to actually return all the supported properties for the current class of the property node, including all of the nested ones? As it is today, that property only returns the top level properties (so it would show a Label property if the node is linked to a class inheriting from Control, but not all the subproperties coming from the Label class). If that's too hard for support reasons, maybe at least adding a new property which will actually return all of them? This is a good idea. I suggest posting it to the Idea Exchange. Quote Link to comment
Yair Posted December 19, 2019 Report Share Posted December 19, 2019 OK - https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Make-the-All-Supported-Properties-property-return-nested/idi-p/4001207https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Make-the-All-Supported-Properties-property-return-nested/idi-p/4001207 Quote Link to comment
paul_cardinale Posted April 21, 2021 Author Report Share Posted April 21, 2021 The SetProperty method still doesn't support dotted property names in LV 2020. Using the attached VI will allow for a smooth transition if SetProperty is every upgraded. Set Property Item.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.