Hot Door CORE Forum

Full Version: Accessing ArtSymbolSetDetailedChangeNotifierType data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to be notified of new symbols added to the Symbols panel.

I have an ArtSymbolSetDetailedChangeNotifierType notifier (ArtSymbolSetChangedNotifierType crashes on startup) and also acquired the SDK AISymbolSuite. The callback works when needed, but how can I acquire the AISymbolSetChangeNotifierData that is supposed to accompany it?


Code:
#include "hdicoreNotification.h"

hdi::core::Notifier symbolSetChangedNotifier;
this->symbolSetChangedNotifier = hdi::core::Notifier(hdi::core::ArtSymbolSetDetailedChangeNotifierType,
    HDI_CORE_CALLBACK(plug::Plugin, this, __symbolSetChangedCB));
this->__corePlug->dispatcher()->registerNotifier(this->symbolSetChangedNotifier);


void plug::Plugin::__symbolSetChangedCB(){
hdi::core::Message* msg = this->__corePlug->dispatcher()->lastMessage();
if (msg->type() != hdi::core::NotifyMessageType)
   return;
hdi::core::NotifyMessage* nMsg = reinterpret_cast<hdi::core::NotifyMessage*>(msg);
//the next line is a problem
hdi::core::ArtSymbolSetChangedNotification* mySymbolNotification =
reinterpret_cast <hdi::core::ArtSymbolSetChangedNotification*> (nMsg->notification());
//mySymbolNotification is NULL, otherwise it seems the next line ought to work

hdi::core::ArtSymbolSetChangedNotification::SymbolVector symV = mySymbolNotification->addedSymbols();
}

A similar approach for ArtObjectsChangedNotification does return a vector of UUIDs to changed art objects.

Any suggestions would be much appreciated.