Microstation connect ElementChangedEvent ChangeTrackKind

Hi,

I overloaded the ElementChangedEvent event and get a ChangeTrackKind value in eventargs.Change

     Delete = 1,
      Add = 2,
      Modify = 3,
      ModifyFence = 5,
      Mark = 7,
      ModelAdd = 9,
      ModelDelete = 10,
      AddXAttribute = 11,
      DeleteXAttribute = 12,
      ModifyXAttribute = 13,
      ReplaceXAttribute = 14

But I get after moving an object (modify = 3) always anaddition event with a value 17. Anyone an idea what this means?

Thanks for help

Markus

Parents
  • Hi,

    here are the missing infod

    Microstion Connect 10.6.0.102

    C# (6.0)

    i overwritten it directly in the run function of a typically C# app

        protected override int Run(string[] commandLine)
        {
          // Register event handlers
          ElementChangedEvent += NanoSicatAddIn_ElementChangedEvent;

    And this values seems only to come when I move a parametriccell block

    Greetings

    Markus

  • Hi Markus,

    from MicroStationAPI DgnPlatform.h header file:

    enum class ChangeTrackAction
    {
        Delete            = 1,  //!< An element was deleted from the file.
        Add               = 2,  //!< An element was added to the file.
        Modify            = 3,  //!< An existing element was changed and rewritten to the file in place.
        AddComplete       = 4,  //!< An element (and its xattributes) were added to the file.
        ModifyFence       = 5,  //!< The fence was modified.
        Mark              = 7,  //!< Used to delineate commands in undo buffer.
        ModelAdd          = 9,  //!< A model was added to the file.
        ModelDelete       = 10, //!< A model was deleted from the file.
        XAttributeAdd     = 11, //!< An XAttribute was addeed to an element.
        XAttributeDelete  = 12, //!< An XAttribute was deleted from an element.
        XAttributeModify  = 13, //!< some part of the XAttribute was modified.
        XAttributeReplace = 14, //!< An XAttribute was replaced.
        ModelPropModify   = 15, //!< A model's properties were modified.
        CustomEntry       = 16, //!< Application data held in the undo buffer (\em not an element-level change to the file).
        ModifyComplete    = 17, //!< An existing element (and its xattributes) were changed and rewritten to the file in place.
        Last              = ChangeTrackAction::ModifyComplete,
    };

    With regards,

      Jan

Reply
  • Hi Markus,

    from MicroStationAPI DgnPlatform.h header file:

    enum class ChangeTrackAction
    {
        Delete            = 1,  //!< An element was deleted from the file.
        Add               = 2,  //!< An element was added to the file.
        Modify            = 3,  //!< An existing element was changed and rewritten to the file in place.
        AddComplete       = 4,  //!< An element (and its xattributes) were added to the file.
        ModifyFence       = 5,  //!< The fence was modified.
        Mark              = 7,  //!< Used to delineate commands in undo buffer.
        ModelAdd          = 9,  //!< A model was added to the file.
        ModelDelete       = 10, //!< A model was deleted from the file.
        XAttributeAdd     = 11, //!< An XAttribute was addeed to an element.
        XAttributeDelete  = 12, //!< An XAttribute was deleted from an element.
        XAttributeModify  = 13, //!< some part of the XAttribute was modified.
        XAttributeReplace = 14, //!< An XAttribute was replaced.
        ModelPropModify   = 15, //!< A model's properties were modified.
        CustomEntry       = 16, //!< Application data held in the undo buffer (\em not an element-level change to the file).
        ModifyComplete    = 17, //!< An existing element (and its xattributes) were changed and rewritten to the file in place.
        Last              = ChangeTrackAction::ModifyComplete,
    };

    With regards,

      Jan

Children