LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Restoring Class accessors via properties

Solved!
Go to solution

LV2013

 

When creating an accessor for a class data member, you have the option to make this accessor available via property nodes.

 

I accidentally removed an accessor VI from the project.

 

The VI itself still exists; it's easy enough to ADD the file back into the project.

 

But when I do so, the properties that used it don't reconnect.  I can replace them with the VI and all is well, but there are cases where I want two or more values and I want to use one property node to get them.

 

How do I tell this VI that it should be accessible via property nodes?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 6
(3,185 Views)
Solution
Accepted by topic author CoastalMaineBird
You need to add a 'property definition' folder (like you create a sub folder in a library/project) to your class.

LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 6
(3,184 Views)

OIC.

 

I created a regular folder called "ACCESSORS", but it should be a "Property Definition" folder.

 

Thanks, Sam !

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 6
(3,174 Views)


Well, that sounded great, but didn't actually work.

 

When I create a PROPERTIES DEFINITION folder and put the accessor VI in there, the only properties I can access are the folders themselves (which makes no sense).

Folders.PNG

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 6
(3,167 Views)
Yes, you need to rename the property definition folder to match the property name you want to access.

It's the name of the folder that is used to determine the name that appears in the property node.

When you create accessors 'the usual way' by right clicking in the class - it automatically names the property definition folders.

Each property will need to have its own folder.

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 6
(3,163 Views)

OK, OK, I see it now.

 

EACH accessor needs its OWN prop-def folder, WITHIN the "accessors" folder.

 

I saw that architecture for months, but never paid attention, because it was handled for me...

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 6
(3,162 Views)