LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add a VI to a project using scripting from a quick drop plugin

Solved!
Go to solution

I have written a quick drop plugin which creates and saves a unit test from a template and adds it to the block diagram of the open VI and puts it in a diagram disable structure.

 

I want to also add this newly created VI to the project in a virtual folder called 'Tests' in the hierarchy level that the open VI is currently in.

 

There are a few things that I cannot work out

  • How to identify where the current VI is in the project (In terms of if it is in a library, in a virtual folder etc)
  • What target the current VI is in
  • How to add the new VI (unit test) to a particular virtual folder in a project/library
  • How to create a new virtual folder

I think this may end up being too complicated but I would be keen to know if anyone can think of a way of solving some of these points.

 

For reference I have attached the current quick drop plugin I have cobbled together very quickly to see if it is actually of use.

0 Kudos
Message 1 of 5
(954 Views)
Solution
Accepted by topic author Worle

Here's your first two.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 5
(923 Views)

And your 2nd two:

api.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 5
(921 Views)

Here it is in LV 2017

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 5
(920 Views)

That is exactly what I was after. Thanks

0 Kudos
Message 5 of 5
(856 Views)