Sets the file system search path for loading image files.
Several ChartDirector operations involve loading image files. Examples are wallpapers (BaseChart.setWallpaper
), background images (BaseChart.setBgImage
), user-defined symbols (DataSet.setDataSymbol2
) or for embedding images in text using ChartDirector Mark Up Language
By default, if a relative path name or just a file name is used for an image file, ChartDirector will assume the path is relative to the "current directory". The setSearchPath method allows you to specify the directory ChartDirector used to search for the file. You may specify more than one directory by separating the directories with semicolons.
If you are using ChartDirector in a web server, note that the "current directory" may not be the same as the script directory. It depends on the web server. For example, for the Microsoft IIS, the "current directory" is the directory of the web server executable, which is usually inside [system32].
To ensure you are loading images from the script directory, you may use setSearchPath to specify the script directory. For example:
Another thing to note is that setSearchPath expects a file system path, not a URL path. For example, the root of the path is the file system root, not the web server document root. If you are using a URL path, please map it to a file system path first before calling setSearchPath.
© 2017 Advanced Software Engineering Limited. All rights reserved.