This function is used in Python Scripting.

Description

Opens the given URL or URI scheme outside of the currently running Client in whatever application the host operating system deems appropriate. For example, the URL:

"http://www.google.com"

will open in the default web browser, whereas this one:

"file://C:/Report.pdf"

will likely open in Adobe Acrobat. The Windows network-share style path like:

"\\Fileserver\resources\machine_manual.pdf"

will work as well (in Windows).

 

Caution: Be careful not to use this function in a full-screen client, as launching an external program will break your full-screen exclusive mode.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.net.openURL(url, [useApplet])

  • Parameters

String url - The URL to open in a web browser.

Boolean useApplet - If set to true, and the client is running as an Applet, then the browser instance that launched the applet will be used to open the URL. [optional]

  • Returns

Nothing

  • Scope

Vision Client

Code Examples
Code Snippet
# This code would open a web page.
system.net.openURL("http://www.google.com")
Code Snippet
# This code would open a PDF document located at C: on the client computer.
# Note the double backslashes are needed because backslash is the escape character
# for Python.
system.net.openURL("file://C:\\myPDF.pdf")
Code Snippet
# This code would open a PDF document from a Windows-based file server.
# Note the double backslashes are needed because backslash is the escape character 
# for Python.
system.net.openURL("\\\\MyServer\\MyDocs\\document.pdf")
Keywords

system net openURL, net.openURL