Jump to content

Automatically generate nested long names for cluster properties

Recommended Posts

I've created a class which contains (mainly) a bunch of settings and a bunch of events. To keep things organized, I've put these into a Settings and Events cluster, respectively, in the class private data control.


If I want to create neat property nodes for such clusters, I have to follow a rather cumbersome procedure:

1. Create a vi for data member access to the whole cluster via the appropriate dialog

2. Create a vi for data member access each individual element via the same dialog

3. Open the Class properties window and navigate to Item Settings

4. Locate the whole cluster accessor and set its Short Name to (e.g.) Settings, plus the Long Name to (e.g.) Settings:All Elements

5. Locate each individual accessor and set its Short Name to (e.g.) Stngs.Polarity, plus the Long Name to (e.g.) Settings:Polarity.


This is very tedious, whereas it seems like a very common scenario in LVOOP development. Are there any solutions to this issue?

Link to comment

There are APIs in LV for this, but creating the code necessary for this can also be tedious and you can read up on scripting to see this. I haven't really dealt with class member generation and so on (the relevant VI server class might have the methods and properties you need for this), but I suggest you download GOOP Development Studio from NI's site and look at the code. It should be open source and I assume that the parts that script the class are also open source.


You could also try looking at the code in <LabVIEW>\resource\framework\providers (or similar), which is the code that actually does this, but I believe that is mostly or all locked.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.