Share

Application.openingFromURL Event

Parent Object: Application
Defined in namespace "adsk::core" and the header file is <Core/Application/Application.h>

Description

The openingFromURL event fires when the user has clicked a link in a web page that uses the Fusion protocol handler to create a new file using an existing file as the initial contents. This event is fired at the beginning of the request but before Fusion has take any action so that it's still possible to cancel the operation.

Syntax

-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
# "application_openingFromURL" is the event handler function.
futil.add_handler(application_var.openingFromURL, application_openingFromURL, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the openingFromURL event.
def application_openingFromURL(args: adsk.core.WebRequestEventArgs):
# Code to react to the event.
app.log('In application_openingFromURL event handler.')

Property Value

This is an event property that returns a WebRequestEvent.

Version

Introduced in version May 2016

Was this information helpful?