LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

open vi object reference - problem

Solved!
Go to solution

I have this vi:

 

open_reference.png

 

The owner refnum is the vi itself, "Path" is a path to a lvproj project file.

 

However, when I try to run the vi I get a "The specified object was not found." error. 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 1 of 7
(3,859 Views)
Solution
Accepted by topic author LarsM

This primitive returns a reference to an object inside a VI (like a control). A project is not inside a VI, so it doesn't make sense to use that function to get a reference to a project.

 

If you want to get a reference to a project by path, there's an Application class method called Project.Open. You can also use the Application class Project.Projects[] property to iterate over all the open projects.


___________________
Try to take over the world!
Message 2 of 7
(3,851 Views)

Thank you. A follow-up question:

 

build.png

 

Here's a half-constructed vi. I'm trying to find a method for compiling a build spec. Is there one?

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 3 of 7
(3,841 Views)

Have a look here - http://blog.jki.net/jki/can-you-build-your-application-in-one-click/

 

LV 2011 should have that VI or one similar to it in the app control palette.


___________________
Try to take over the world!
0 Kudos
Message 4 of 7
(3,831 Views)

> LV 2011 should have that VI or one similar to it in the app control palette.

 

But I take it LV 2010 doesn't.

 

Anyhow, it worked fine, until I tried running it in a dll, then it didn't.

 

Oh well, thank you for your help. I got a bit wiser in any case. 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 5 of 7
(3,820 Views)

LarsM wrote:

 

Anyhow, it worked fine, until I tried running it in a dll, then it didn't.


I realize this is thread necromancy, but I also ran into this and I think it's a bug. Maybe it is, maybe it isn't, but at least there's a way to trigger the misbehavior. I hope it's fixed in LabVIEW 2014 or there is a work around.

 

LV RTE cannot open project files that have .lvlib references in Dependencies

http://forums.ni.com/t5/LabVIEW/LV-RTE-cannot-open-project-files-that-have-lvlib-references-in/td-p/...

0 Kudos
Message 6 of 7
(3,731 Views)

MacNorth wrote:

I realize this is thread necromancy, but I also ran into this and I think it's a bug. Maybe it is, maybe it isn't, but at least there's a way to trigger the misbehavior. I hope it's fixed in LabVIEW 2014 or there is a work around.


I found a workaround: set the libdir key in the executable's ini file.

 

LV RTE cannot open project files that have .lvlib references in Dependencies

http://forums.ni.com/t5/LabVIEW/LV-RTE-cannot-open-project-files-that-have-lvlib-references-in/m-p/3...

Message 7 of 7
(3,646 Views)