2.14.1.9 imgFile

Brief Information

Open dialog to select image file

Additional Information

X-Function not designed for Auto GetN Dialog.

Command Line Usage

1. imgFile; // the image full path will be stored in system variable fname$

2. imgFile title:="String As Input";

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
image file fname

Output

string

fname$

The string that will receive path and name of the user's chosen file.

dialog title title

Input

string

input dialog title.

Description

This X-Function opens a dialog to select an image file and store the file name in a string variable.

Examples

The following example shows how to pick an external image and then use insertImg2g X-Function to insert the image as the background of your graph:

    if (exist(%H, 3) == 3) {    // check if the current activated page is a graph window or not
        string strImgFullPath$;
        imgFile fname:=strImgFullPath$ title:="Pick Your Image"; //open a dialog to pick image. the full path of the selected file will be stored in a string variable called strImgFullPath$
        insertImg2g fname:=strImgFullPath$ type:=0 xyp:=2;    // insert the picked image into the current graphlayer as background
    }

Related X-Functions