LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Class Private Methods

I'm doing a number of instrument drivers in LabVIEW 8.20 and am using the OO features which so far I'm really liking.
 
At present I have my class with various methods in it that are called from a TestStand sequence, but there are some methods that are only called from within the class i.e. private methods - is there any way of defining a method as being private to other methods in the class?
 
I noticed that on one of the instrument driver examples in the help that one of the class sub-folders had a little red key on it that looked as though it was indicating that files within this folder were private - is this what I'm looking for and how would I do that?
 
Many thanks in advance for any responses,
 
 
David Clark
CLA | CTA
Genesee Technologies Ltd
Hampshire, England
0 Kudos
Message 1 of 2
(3,565 Views)

I've found out how to do it :-

(from help file)

Setting the Access Scope of Member VIs

You can set the access scope of a member VI to control user access to the member VI. Complete the following steps to set the access scope of a member VI.

  1. In the Project Explorer window, right-click the LabVIEW class icon for the class whose member VI access you want to change. The Class Properties dialog box appears.
  2. Select Item Settings from the Category list.
  3. To customize the access scope of items in the LabVIEW class, select an item from the Contents list on the Item Settings page.
  4. In the Access Scope section, select from the following options:
    • PublicAny VI can call the member VI as a subVI.
    • ProtectedOnly VIs within the same class or a descendant class can call the member VI. Protected member VIs display a dark yellow key glyph in the Project Explorer window.
    • PrivateOnly VIs within the same class can call the member VI. Private member VIs display a red key glyph in the Project Explorer window.
  5. Repeat steps 3 and 4 for all items for which you want to change the access scope.
  6. Click the OK button to close the Class Properties dialog box.
David Clark
CLA | CTA
Genesee Technologies Ltd
Hampshire, England
0 Kudos
Message 2 of 2
(3,556 Views)