dsApplicationEvent_id_e Enumeration

dsApplicationEvent_id_e Enumeration | Send Feedback
See Also

Types of DraftSight application events.

# Syntax

Visual Basic |
--- | ---
    Public Enum dsApplicationEvent_id_e
       Inherits System.Enum

C# |
--- | ---
    public enum dsApplicationEvent_id_e : System.Enum

JavaScript |
--- | ---
    dsApplicationEvent_id_e : String

COM native C++ |
--- | ---
    enum dsApplicationEvent_id_e

C++ |
--- | ---
    enum dsApplicationEvent_id_e

# Members

Member | Description
--- | ---
dsApplication_ActiveDocumentChangedNotify_id | 5 = ActiveDocumentChangedNotify
dsApplication_ApplicationOptionBoolChangeNotify_id | 9 = ApplicationOptionBoolChangeNotify
dsApplication_ApplicationOptionDoubleChangeNotify_id | 12 = ApplicationOptionDoubleChangeNotify
dsApplication_ApplicationOptionInt16ChangeNotify_id | 10 = ApplicationOptionInt16ChangeNotify
dsApplication_ApplicationOptionInt32ChangeNotify_id | 11 = ApplicationOptionInt32ChangeNotify
dsApplication_ApplicationOptionStringChangeNotify_id | 13 = ApplicationOptionStringChangeNotify
dsApplication_CommandCancelNotify_id | 8 = CommandCancelNotify
dsApplication_CommandPostNotify_id | 7 = CommandPostNotify
dsApplication_CommandPreNotify_id | 6 = CommandPreNotify
dsApplication_DestroyNotify_id | 4 = DestroyNotify
dsApplication_FileNewNotify_id | 1 = FileNewNotify
dsApplication_FileOpenPostNotify_id | 3 = FileOpenPostNotify
dsApplication_FileOpenPreNotify_id | 2 = FileOpenPreNotify
dsApplication_OnIdleNotify_id | 14 = OnIdleNotify

# Remarks

To receive notifications, a DLL application must register for the notifications by object type. This registration must be done for each instance of a particular object.

For example, the file:

- DsAddinConnection.h, included in the DraftSight API COM native C++ interface template, automatically registers events:

> BEGIN_SINK_MAP(CDsAddinConnection)

> > SINK_ENTRY_EX(IDC_DSAPPLICATIONEVENT, DIID__IApplicationEvents, dsApplication_FileNewNotify_id, OnFileNewNotify)

> > SINK_ENTRY_EX(IDC_DSAPPLICATIONEVENT, DIID__IApplicationEvents, dsApplication_FileOpenPreNotify_id, OnFileOpenPreNotify)

> > SINK_ENTRY_EX(IDC_DSAPPLICATIONEVENT, DIID__IApplicationEvents, dsApplication_FileOpenPostNotify_id, OnFileOpenPostNotify)

> > SINK_ENTRY_EX(IDC_DSAPPLICATIONEVENT, DIID__IApplicationEvents, dsApplication_ActiveDocumentChangedNotify_id, OnActiveDocumentChangedNotify)

> END_SINK_MAP()

- dsAddinConnection.h, included in the DraftSight API C++ interface add-in template, automatically registers and unregisters events:

> myApplication(dsApplication_c *dsApp) : m_dsApp(dsApp) {

> > RegisterApplicationFileNewNotifyHook(m_dsApp);

> > RegisterApplicationFileOpenPreNotifyHook(m_dsApp);

> > ...

> }

> ~myApplication() {

> > UnRegisterApplicationFileNewNotifyHook(m_dsApp);

> > UnRegisterApplicationFileOpenPreNotifyHook(m_dsApp);

> > ...

}

# See Also

####

Interop.dsAutomation Namespace