LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create virtual folder in a project programmatically

Venky,

 

You beat me by just a minute... !Smiley Wink

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 11 of 20
(2,174 Views)

Partha,

 

i clearly understand what Venky wants to have.

If you take a look into the example, the physical folders are added as virtual folders to the project. This is done by the type "folder". You can add any item you like to the project as "folder" and will only create virtual folders all the time.

 

Testing is the key!

 

hope this helps,

Norbert

 

PS: If you don't want to add a physical folder as a virtual folder, the "path" input to the invoke node has to be "Not a Path"..... 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 12 of 20
(2,167 Views)

Norbert B wrote:

Partha,

 

i clearly understand what Venky wants to have.

If you take a look into the example, the physical folders are added as virtual folders to the project. This is done by the type "folder". You can add any item you like to the project as "folder" and will only create virtual folders all the time.

 

Testing is the key!

 

hope this helps,

Norbert

 

PS: If you don't want to add a physical folder as a virtual folder, the "path" input to the invoke node has to be "Not a Path"..... 


 

Yes, worked for me!

 

 

Ben

Message Edited by Ben on 02-13-2009 08:06 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 13 of 20
(2,164 Views)

Norbert B wrote:

 

PS: If you don't want to add a physical folder as a virtual folder, the "path" input to the invoke node has to be "Not a Path"..... 


I think, from Ben's picture, it is an empty path.

 

I tested & Not A Path gave error.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 14 of 20
(2,157 Views)

Well, works both for me.

LV 8.6 eng. on english Windows XP.

 

 

 

Norbert 

Message Edited by Norbert B on 02-13-2009 08:41 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 15 of 20
(2,142 Views)

HI Norbert,

 

I ignored the example and fat fingered my way to a solution but I used Targets rather than Children.

 

What is the differnce between the two approaches since they both seem to achieve the same end?

 

Curious,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 16 of 20
(2,135 Views)
So ... has this question been answered?
0 Kudos
Message 17 of 20
(2,131 Views)

Ben,

 

Children:

Returns an array of references to all children of the referenced project item. You can use these references with the ProjectItem properties.

 

Targets:

Returns an array of references to all targets in the current LabVIEW project. You can use these references with the TargetItem properties.

 

Now to the question:  "What is the difference between a child and a target?"

Mainly, i'd say, it is a terminology-issue. Both are "ProjectItems", but specify a little different.

The mayor difference appears in the logical setup within a project:

A project has Targets like "My Computer" (normally not called "child"). Those are not necessarily direct descendants from "Project", so they can be logically be dedicated to other ProjectItems.

Within any target, you have a collection of children, which can of course contain "Targets" (see attached example). This is the point where both termini begin to diffluence.

 

As a general rule:

- A target is something you add as "New >> Target and  Devices" to the project.

- A child is anything else (VI, ctl, lvsc, lvlib, xml, txt, rtf, ....)

 

I am not sure if this definition is 100% NI'ish, but it fits to my experience an, at least in my mind, makes sense 🙂

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 18 of 20
(2,127 Views)

Attached you can find an improved version of the Children_vs_Targets_86.vi. Please note that in an ideal world, i would close all references. Since i only read properties, it doesn't hurt too much not closing the references in the end....

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 19 of 20
(2,125 Views)

Hi,

 

 

 

Thank you Norbert ,it is working.

 

 

 

 

Rgds,

Venky 

0 Kudos
Message 20 of 20
(2,094 Views)