DriveWorks Pro 16: FsGetURL [send feedback...]


Retrieves a URL for the given file to be displayed in a browser. This resource URL can be used in a Web Frame Control or a Hyperlink Control to display or download the specified file.

Files types like PNG, JPG, PDF and HTML will display in a web browser. They will display in a new tab or a Web Frame control. Files like SLDPRT, DOCX, XLSX and ZIP cannot be displayed in a web browser and will be downloaded to the client's machine.


FsGetURL([File Location])


File Location is a path to the file to be displayed in a browser. If this is not a full path then it shall be treated as being relative to the project's location.

This function will not automatically update. To update the function, one of the arguments must change to re-trigger the function.



FsGetURL("C:\DriveWorks\Specifications\Trailer 0001\BOM.html")This will return a resource URL /resource/be51477595c7498394193a2b062dc710/BOM.html

This can now be used in a Web Frame Control or Hyperlink Control to display the content.


FsGetURL("C:\DriveWorks\Specifications\Trailer 0001\BOM.html")/resource/be51477595c7498394193a2b062dc710/BOM.htmlThe file has been found in the location and a resource URL has been returned.
FsGetURL("C:/DriveWorks/Specifications/Trailer 0001/BOM.html")#VALUE!The path to the file is invalid. It contains / in the file path which is an invalid character.

Handling an Error

FsGetURL results in a #VALUE! if the file does not exist or if the path contains invalid characters.

This can be handled by nesting the function inside an IfError function. This will handle the error and allows you to display an alternative value or file. For example, you could show a file not found image on the control.

Table of Contents