LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

X Control "protected" property

There is a property of an x control I want to only set from one specific VI. I don't want the programmer to be able to set this property, but I want to be able to access it in one location (a loop I'm running the background, but that should be the only place this particular property of the X control should be updated from). It seems access scope doesn't apply to properties and methods of an X Control. Is there any way I can do this, or am I out of luck?

0 Kudos
Message 1 of 5
(2,230 Views)

Hey imstuck,

 

I'm afraid we're doomed on this one.

 

The Xcontrol's class properties have default attributes concerning the privacy (false) and the need for scripting (false), 2 major attributes for regular VI Server properties/methods. Of course, an XCtrl is not a persistent class but the mechanism for the property creation is the same, and as we can't set the privacy of the property, it will always display.

 

The access scope is just for executing the property/method VI inside or outside the Xcontrol just like any other library VI.

The weird part is that the access scope does not exist for properties in the Item Settings page of the xcontrol... Something to look at !

 

Best regards,

Eric

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

Message 2 of 5
(2,217 Views)

Do you actually need a property for this? If you planned on it being private, it's probably part of the XCtl anyway, so you might be able to manage it by firing up a daemon when the XCtl is fired up and pass a user event/queue/control reference/etc. to allow the daemon to do what you need. You then stop the daemon when the XCtl is uninited. There's one example here - http://lavag.org/topic/13267-x-control-with-parallel-process/


___________________
Try to take over the world!
Message 3 of 5
(2,205 Views)

@tst wrote:

Do you actually need a property for this? If you planned on it being private, it's probably part of the XCtl anyway, so you might be able to manage it by firing up a daemon when the XCtl is fired up and pass a user event/queue/control reference/etc. to allow the daemon to do what you need. You then stop the daemon when the XCtl is uninited. There's one example here - http://lavag.org/topic/13267-x-control-with-parallel-process/


"Roll-your-own"

 

My thought exactly Yair!

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(2,200 Views)

@Eric.M wrote:

Hey imstuck,

 

I'm afraid we're doomed on this one.

 

The Xcontrol's class properties have default attributes concerning the privacy (false) and the need for scripting (false), 2 major attributes for regular VI Server properties/methods. Of course, an XCtrl is not a persistent class but the mechanism for the property creation is the same, and as we can't set the privacy of the property, it will always display.

 

The access scope is just for executing the property/method VI inside or outside the Xcontrol just like any other library VI.

The weird part is that the access scope does not exist for properties in the Item Settings page of the xcontrol... Something to look at !

 

Best regards,

Eric


Thanks for your feedback. I figured this was the case, and I also know this is a strange request with very limited use cases, but it was worth a shot.

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