Synchronization APIs

Several functions support this feature. These include

The acedSetIUnknownForCurrentCommand() function associates a COM object wrapper with the current command of the current document. Your application calls this function to designate your object as the target of Properties palette notifications. The AcEditorReactor::cmdIUnkModified() function's notification is sent after every successful call to acedSetIUnknownForCurrentCommand(). The acedGetIUnknownForCurrentCommand() function returns the associated object's IUnknown pointer.

The AcApDocManager::sendModelessInterrupt() function triggers a sequence that ultimately notifies a command of a Properties palette interruption. This function notifies the document specified in its sole parameter. The document forwards this notification to the currently active command by means of ObjectARX user-input functions.

Two constants—ACRX_CMD_INTERRUPTIBLE and RTMODELESS—help to establish and synchronize this communication channel. The ACRX_CMD_INTERRUPTIBLE flag is used to define commands that can be synchronized with Properties palette input. The user-input functions acedGetXxxx() and AcEdJig::acquireXxxx(), which are called by these synchronized commands, return RTMODELESS when the current document sends a modeless interrupt notification. The document sends this message only if the running command currently is prompting and was registered with the ACRX_CMD_INTERRUPTIBLE flag. Your command handler is responsible for checking user-input function return values and responding appropriately.