MS CE, Update 15, Language: C++
This question concerns using of change tracking functions. Callback function is set as follows:
ChangeTrack::AddChangedFunction (myChangeTrackFunc)
Signature of myChangeTrackFunc is:
void ChangeTrackFunc_Changed( MSElementDescrP newDescr,
MSElementDescrP oldDescr,
DgnPlatform::ChangeTrackInfo *info,
bool *cantBeUndoneFlag)Argument DgnPlatform::ChangeTrackInfo *info is declared as follows (in ITxnManager.h):
struct ChangeTrackInfo
{
ChangeTrackAction action; //!< type of action
Int32 processNumber; //!< process active at time of entry
Int16 funcname; //!< Number of RTYPE_CMDNAME resource.
Int32 idNumber; //!< id for grouping undos
};My question relates to structure member funcname. It is described as: Number of RTYPE_CMDNAME resource.
What does that mean ??? Where do I get this requested command number from ???
Background:
In my code I'm using several MicroStation commands to modify existing MicroStation elements (like : trim extend, trim tointersection, etc.)
Each element modified by one of these MicroStation commands has to be processed by my callback function myChangeTrackFunc
depending on the MicroStation command which has modified the current element.
So my callback function would look as something like this:
void yourChangeTrackFunc (MSElementDescrP newDescr,
MSElementDescrP oldDescr,
DgnPlatform::ChangeTrackInfo *info,
bool *cantBeUndoneFlag)
{
switch (info->action)
{
case ChangeTrackAction::Modify:
{
// Element modified
switch info->funcname:
{
case <Number of RTYPE_CMDNAME resource MS Cmd: Trim Extend>:
{
...
}
break;
case <Number of RTYPE_CMDNAME resource MS Cmd: Trim ToIntersection>:
{
...
}
break;
... more MS Commands
}
}
break;
}
}Any hints are appreciated. Thanks.
Martin Gitschel