QControl Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

QControl Property Creation

Solved!
Go to solution

So maybe I'm just missing something from my LabVIEW class knowledge, but how do you create a property for something that is not in the class data. I see that you can override the properties of the base control, but for example in the TreeDirectory control, there's a "Directory" property. How was that created?

"All truths are easy to understand once they are discovered; the point is to discover them." -- Galileo Galilei

0 Kudos
Message 1 of 3
(1,229 Views)
Solution
Accepted by topic author B.Settles

You are correct, when creating a data accessor. In that case the code is scripted to only bundle or unbundle data from the class private data. However, you can right-click the class or a virtual folder in the class and create a Property Definition Folder. Then create your read and/or write (set and/or get) property VIs. The requirement for a property VI in these special folders is that it has the class as input and output, the error as input and output, and either one input or one output of any type. The code inside of it can really be anything you want it to be. It doesn’t have to be just a bundle or unbundle. In the case of QControls, a lot of the time you’ll be accessing you State Data DVR inside one of these property VI. Hope this helps. 

PS I am in the process of creating a State Data Accessor scripting tool to help make those types of property VIs.

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 2 of 3
(1,225 Views)

Thank you. I just learned something today, and it makes LabVIEW classes even better. 😀

"All truths are easy to understand once they are discovered; the point is to discover them." -- Galileo Galilei

0 Kudos
Message 3 of 3
(1,214 Views)