LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access image from Auto populating folder

Hi,

 

I have some pictures should be displayed on certain process. I added those pictures to the auto-populating folder rather than entering the complete path of the image.

But i don't know to access the image by using some short cuts (Application directory/ default directory from Filo I/o constants).

 

Still I am accessing by using the complete path. Whenever i shift the project, i need to enter the new path again and again.

 

Can anyone give me a solution to access the image efficiently.

 

Thanks in advance!

 

Best regards,

Shree

0 Kudos
Message 1 of 2
(2,934 Views)

In your example, the Images live in a Folder that is located within the Project.  I'm going to assume that the entire Project (including the Picture Folder) is, itself, located in what I'll call the Project Folder, a physical folder somewhere on one of your disks.

 

All that you need to do is to locate the Picture folder, which you can do from a VI that "lives" inside the Project.  There are a series of Functions in the File I/O Palette that will help you to do this.  The easiest way to do this is to create a VI called "Find Picture Folder" -- this VI calls the function "Current VI's Path" (from the File Constants sub-Palette), does a Strip Path, and returns the Folder containing this VI. If you place it inside the Picture Folder, it will return the path to the Picture Folder when called from anywhere in your Project!  I've tested it in Development Mode, and am pretty sure it will also work if built into an Executable.

 

Bob Schor

0 Kudos
Message 2 of 2
(1,930 Views)