LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create .NET Object from one of two locations

I'm currently using a constructor node to create a .NET object reference in which i invoke methods in my labview VI.

 

I'm finding that some users of my product have this .dll installed on either the 😧 or C: drive, but with the exact same file path aside from the drive.

 

So... I'm looking for a way to determine the .dll location dynamically, depending on which location exists, and create the object from this information that is obtained dynamically... any ideas?

 

Thanks!

0 Kudos
Message 1 of 4
(2,555 Views)

Hairbrained idea but it might work

 

An array of vi server references to vi's that target the constructor from all possible locations.  Use Call By reference and pass out a ref to the constructor that did not error.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 4
(2,547 Views)

I like the way you are thinking but I'm not sure that this solution is even possible because the vi creates a popup to load dependencies prior to even opening it...

 

If I reference the VI that contains the constructor node i guess it's possible that it will simply output an error and not popup to load dependencies? since it's loading/running the VI in the background. I'll give this a try if I can't find a more straight forward approach. Thanks.

Any other suggestions?

0 Kudos
Message 3 of 4
(2,528 Views)

If I reference the VI that contains the constructor node i guess it's possible that it will simply output an error and not popup to load dependencies? 

Not really much choice here since the vi with a reference to the bad location for the constructor node will be "Broken" (Unable to load dependancies).  It might be possible to surpress the locate dependancy dialog  BUT! this is moving into the "here be dragon's" area of LabVIEW and I suspect it would have additional un-intended consequences


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 4
(2,523 Views)