Jump to content
News about the LabVIEW Wiki! Read more... ×
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

Correct. Scripting does not support setting dotted properties.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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