LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Library from VI

Hi Everyone!

 

I'd like to save bmp files in library and then call this library from labview VI.

 

Can anyone explain to me how to do it?

 

Thanks!

0 Kudos
Message 1 of 8
(3,686 Views)

Which Library you are refering here?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 8
(3,680 Views)

Hi P@Anand,

 

I am using lvlib.

0 Kudos
Message 3 of 8
(3,678 Views)

That is about as clear as mud! Please what are you trying to do? What library are you talking about?

 

Or are you saying you want to store a BMP file inside an *.lvlib file?

 

That won't work since an *.lvlib file is just an XML file that describes the components in the library. It is in fact similar to a LabVIEW project file. You can of course add your BMP to the lvlib in the project explorer and if you make sure to store it on a fixed relative position to another VI in that lvlib you can always determine the location of that VI, add the known relative path to that location and load the BMP with the LabVIEW provided Picture functions and then do whatever you want inside your VI.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 4 of 8
(3,654 Views)

@rolfk wrote:

make sure to store it on a fixed relative position to another VI in that lvlib you can always determine the location of that VI, add the known relative path to that location and load the BMP with the LabVIEW provided Picture functions and then do whatever you want inside your VI.


I've created the lvlib inside the Project Explorer but i don't understand how to create this portion that you're talking about.

Could you show me a BD on how to do it? 

0 Kudos
Message 5 of 8
(3,645 Views)

Perhaps what Rofl meant is something like below.

 

Load Picture.png

 

As he said, ensure the file location is fixed relative to a VI. If the location is always fixed, you can drag and drop the picture from your lvlib in the Project Explorer to the block diagram to get the full file path.

 

You may want to explore the File I/O pallette for other ways to do this.

 

Regards,

A. Yodha

NI Singapore

0 Kudos
Message 6 of 8
(3,577 Views)

Actually what I meant was to replace Application Directory.vi with Current VI Path, and then add the relative path from this VI inside the library directory to the BMP also inside the library directory. Then just make sure that you copy both (and the *.lvlib file) when distributing this library.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 7 of 8
(3,566 Views)

@rolfk wrote:

Actually what I meant was to replace Application Directory.vi with Current VI Path, and then add the relative path from this VI inside the library directory to the BMP also inside the library directory. Then just make sure that you copy both (and the *.lvlib file) when distributing this library.


I see. That will work.

 

Regards,

A. Yodha

NI SIngapore

0 Kudos
Message 8 of 8
(3,552 Views)