07-23-2008 07:57 AM
07-24-2008 12:45 PM - edited 07-24-2008 12:45 PM
11-07-2008 12:20 PM
I just discovered a Method for the Project Application Object called "Deploy Items", which sounds exactly like what I'm trying to do! You need to give it an array of ProjectItems, which you can get using the following chain: Use the Application Property "Projects" to get an array of all current Projects (there should be just one). For each Project, use the "Targets" Property to get a list of all Targets. For each Target, look at the TypeString and ignore "My Computer" -- this gets you all the Remote Targets. At the same step, you get a list of all "Children" on the Target. For each Child, look at the TypeString and select "VI" and add it to an array of ProjectItem that was initialized to an empty array. In my case, I had one Project, one Target, and one VI at the top level of this VI. This routine correctly found this and built the array (with a single element).
This Array of Items is now presented to the Deploy Items method of the Project found previously. Logic (and the LabVIEW Help) suggests this should be the equivalent of right-clicking on the VI on the Project Explorer and chosing Deploy -- when you do this, you see a dialog box pop up as stuff gets sent via Ethernet to the Remote, and the green light indicator by the Remote Target in Project Explorer lights up. However, when you do the same thing using the Deploy Items method, nothing happens!
So close, yet so far. I've sent a version of this VI to NI, asking "Why doesn't the Deploy Items method do the same as right-clicking and choosing Deploy in Project Explorer?" Is something broken? Am I leaving something out?
I've attached a picture (=1000 words) of the "guts" of this VI. For simplicity (and for testing!), I've removed the Close Reference items (it helps fit the picture on the screen). Now if I could only get this to work!
Bob Schor
11-10-2008 05:00 PM - edited 11-10-2008 05:01 PM
Hi Bob,
Would you please clarify, is the "Remote" PXI running LVRT?
