Open dialog to select image file
X-Function not designed for Auto GetN Dialog.
1. imgFile; // the image full path will be stored in system variable fname$
2. imgFile title:="String As Input";
Please refer to the page for additional option switches when accessing the x-function from script
Output
string
The string that will receive path and name of the user's chosen file.
Input
input dialog title.
This X-Function opens a dialog to select an image file and store the file name in a string variable.
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 }