LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create a property definition vi in LabVIEW class

Solved!
Go to solution
Solution
Accepted by hmarcano

No problem. Personally, I don't use the property definition functionality very much, I just use data access VIs. There are some cases where it's helpful, but I haven't found a huge need. I kinda hope someone else comes in here and points out a huge use-case that I haven't thought of.

 

Thanks are best given in the form of Kudos and Marked Solutions (Unofficial Forum Rules and Guidelines). Marked Solutions help others find this post when they have the same issure and Kudos motivate us all to keep coming back to help! Smiley Wink

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 11 of 12
(941 Views)

Generally, you don't need to do this manually. In the dialog for creating accessors (which you access by right clicking the class in the project window or specific items in the private data cluster) there is a checkbox for creating the accessors as properties which does this for you.

 

As for use cases, the most obvious one is if you want to set multiple fields in the same object - the code is much cleaner and easier to read if you can use a property node and extend it down. It can also save time on creating icons, which some people frown at. Of course, some people also frown at the whole concept of public accessors, instead preferring to have well defined VIs for every action done by the class.


___________________
Try to take over the world!
Message 12 of 12
(920 Views)