LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Friend Can't Access Community Property

In the attached file, "Class 1.lvclass" has a property "Checkbox".  "Read Checkbox.vi" is set to Public scope. and "Write Checkbox.vi" is set to Community scope.

"Friend.vi" is designated as a friend of "Class 1.lvclass".

Why can't "Friend.vi" write to the "Checkbox" property of "Class 1.lvclass"?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 1 of 5
(2,150 Views)

It is interesting to note that, while the property node cannot change to "Write Checkbox", you can just drag the Write Checkbox accessor VI to Friend.vi and it will work fine.

 

Edit: This is weird. Drop "Write Checkbox.vi" onto the diagram and wire it up. Right clicking the property node now gives you the option to change to Write. Delete the accessor VI, and now the property node can be changed from Read to Write freely. Very strange.

0 Kudos
Message 2 of 5
(2,113 Views)

What version of LabVIEW are you using?

 

I'm using LabVIEW 2019 and I was able to unzip your attachment, open Friend.vi and change to write. I wrote a TRUE to that property node then read it back from another property node so it seems to work as expected for me.

Matt J | National Instruments | CLA
0 Kudos
Message 3 of 5
(2,077 Views)

@Jacobson-ni wrote:

What version of LabVIEW are you using?

 

I'm using LabVIEW 2019 and I was able to unzip your attachment, open Friend.vi and change to write. I wrote a TRUE to that property node then read it back from another property node so it seems to work as expected for me.


2018

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 5
(2,062 Views)

For what it's worth I'm using 2018 as well. When I right click the property node, "Change to Write" is grayed out and is unselectable. When I manually add the Write accessor as described above, I can then right click and set the property node to Write.

0 Kudos
Message 5 of 5
(2,058 Views)