Jump to content
paul_cardinale

Programmatically Set a Property Item

Recommended Posts

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:pii.png.b188c9093fea8671624201b3b36d510a.png

For example, setting a property item for a Control property node to "Label" simply requires the ID string "6332005"; yielding:pl.png.5e1023bdabed67525407876ebb0c3734.png

However many properties require more that one ID.  For instance:plt.png.5fd840fd4219e8982aa32bcff07e8f2b.png 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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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. (?)

  • Like 1

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Does this mean its deprecated status will be removed?

Also Paul, just wondering, how did you find that property?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.