LabVIEW Project Providers

cancel
Showing results for 
Search instead for 
Did you mean: 

How to have nested items (Owned Items)

I'm writing a primary project provider with the idea that I could use it to organise files along with metadata. But I'm struggling to make my new custom-item have nested project-items. In the below screenshot (item_init.vi), I am creating two virtual folders with the hope of nesting them in the custom-item I created. You can see from the project XML that the virtual folders are where you would expect. However, they don't appear on the project explorer UI itself (I've tried other nested items too, not just virtual folders).

 

The New custom items appear in the project explorer, but not the nested items

 

Am I missing a "Allow Nested Items" flag or similar? Does anyone know what I'm missing?

McQuillan_0-1681307330119.png

 

0 Kudos
Message 1 of 6
(1,237 Views)

Hi Tom,

 

I use this function in the AZM toolkit. It works. Probably you should capitalize the first letter: 

 AddFolder.gif

The working code can be found in Proj_member:CreateFolder4.vi in the toolkit (last version,  it is in https://azinterface.net/ ).

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 2 of 6
(1,225 Views)

@_Y_ wrote:

Hi Tom,

 

I use this function in the AZM toolkit. It works. Probably you should capitalize the first letter: 

 AddFolder.gif

The working code can be found in Proj_member:CreateFolder4.vi in the toolkit (last version,  it is in https://azinterface.net/ ).


Thanks for sharing the link to your Multiple Inheritance tool!  Looks cool 🙂

Question about your suggestion to Tom @McQuillan.

Is the Project Item you're calling `AddItem()` on..

A) a Primary Provider item (your custom provider item type)

or...

B) a  Folder (that has a Secondary Provider registered to it)?

It seems that (B) is possible, however (A) seems to be elusive (I was chatting with Tom about the use case).

 

0 Kudos
Message 3 of 6
(1,188 Views)

@Jim_Kring wrote:

@_Y_ wrote:

Hi Tom,

 

I use this function in the AZM toolkit. It works. Probably you should capitalize the first letter: 

 AddFolder.gif

The working code can be found in Proj_member:CreateFolder4.vi in the toolkit (last version,  it is in https://azinterface.net/ ).


Thanks for sharing the link to your Multiple Inheritance tool!  Looks cool 🙂

Question about your suggestion to Tom @McQuillan.

Is the Project Item you're calling `AddItem()` on..

A) a Primary Provider item (your custom provider item type)

or...

B) a  Folder (that has a Secondary Provider registered to it)?

It seems that (B) is possible, however (A) seems to be elusive (I was chatting with Tom about the use case).

 


Sorry Jim, I am not so good in terminology. What are Primary and Secondary providers?

 

AddItem node is called on reference to LVClass. The class is right-clicked in the project, corresponding item of the popup menu is selected. Then the reference is obtained with mxLvGetItemRef.vi (AZ_MultiInheritance_OnCommand.vi in my code).

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 4 of 6
(1,168 Views)

OK, that makes sense. Adding a folder to a class is a capability that already exists in LabVIEW. So, it makes sense that that would work 🙂

 

A “primary” project provider defines a new type of item. A “secondary” provider defines a set of functionality that extends an existing type of item (meaning that it extends the functionality of a primary provider).

 

it appears that there is a special behavior attribute that needs to be set on a primary provider for it to declare that it is capable of having children. If this attribute is not set, then the labview project explore environment will not traverse it for children items.

 

It’s not clear whether it’s possible to set this attribute or whether there is a closed set of project item types that support children. I’m looking into it more deeply with LV R&D.

 

 

Message 5 of 6
(1,159 Views)

Thank you Jim, I had no idea about primary providers. Now I have😀

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 6 of 6
(1,151 Views)