DataEvent.add Method

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

Description

Add a handler to be notified when the data event occurs.

Syntax

"dataEvent_var" is a variable referencing a DataEvent object.
returnValue = dataEvent_var.add(handler)
"dataEvent_var" is a variable referencing a DataEvent object.

#include <Core/Dashboard/DataEvent.h>

returnValue = dataEvent_var->add(handler);

Return Value

Type Description
boolean Returns true if the addition of the handler was successful.

Parameters

Name Type Description
handler DataEventHandler The handler object to be called when this event is fired.

Samples

Name Description
Save and Insert File API Sample Demonstrates creating save a new file and then inserting it into a design. To use this sample, have a design open that has been saved and run the script. It will create a new design that contains a cylinder, save it to the same folder the active design was saved to, and then insert it into the active design.

Version

Introduced in version January 2022