Tracking element changes - as they happen?

Hi guys,

Is there a means of tracking the changes being made to an element as hey happen? ie, you click on the start point of a line, say, and as you move it, you get notified (cursor position, the element being changed etc).

Is this possible?

I know of the IChangeTrackEvents interface, but I think that only pre/post notifies you of a change event, but not as it happens (dragging etc).

 

Regards

John.

Parents
  • Dynamics Events

    In MicroStation terminology, you are asking about dynamics events. As the user provides data points and moves the cursor, MicroStation's primitive command state machine provides the information you want.

    It looks like you are interested in the VBA events, so I suggest you look at the documentation about IPrimitiveCommandEvents and ILocateCommandEvents. Each provides a _Dynamics event callback.

    Model Change Events

    The IChangeTrackEvents notifies you when an element has been added, modified or deleted. Your interpretation is therefore correct.

    It's useful to know, for example, when a shape element has changed. You can measure its area and update a related text or tag element.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

  • Hi Jon,

    Thanks for the info, however, the Dynamics events interfaces, as far as I understand it, only work for commands YOU intend on implementing. What I want to know is, how can I be notified when an element is being changed, by say, one of Microstations commands, like Move, for example, not one of my commands.

    So, if you have a line, and you click on it's start point, then move it around, I want my AddIn to know about it, to track that movement, know what I mean?

    Regards

    John.

  • AFAIK there's no way to intercept the dynamics event of another MDL task.

    Why do you want to do that?

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Reply Children
  • Hmmm, well, I would like to be able to 'connect'  element A to element B, so that when element B gets moved or modified, then element A goes along with it, in real time.

    Is this possible in MS?

    cheers

    John.

  • I think it would be easier to write your own "extended move function" then to monitor every function in MicroStation, that could move an element.

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • johnds said:
    I would like to be able to 'connect'  element A to element B, so that when element B gets moved or modified, then element A goes along with it, in real time.

    How about to add those connected elements into cell or graphic group?

    Dan

  • Yeah, but then the elements would move as a 'whole', and I dont want that.

     I also want to allow the user to modify any number of connected elements 'individually', and have the rest of the connected elements 'react' to those changes. See what I mean?

    Kinda like what GC does.

  • Dependency API

    John: I would like to be able to 'connect' element A to element B, so that when element B gets moved or modified, then element A goes along with it

    That's a different question, the answer to which is the MDL Dependency API. For an example, look at tags. Define a tag set, tag an element, then move that element. The tags move with the host.

    You can achieve the same using the MDL Dependency API. Mark Anderson provided an example some years ago called BoxDemo.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

  • Thanks Jon, I will take a look at the Dependency API, and try find this box demo.

    Tags are not what I want, but I will see what this Dep API is all about.

    Cheers.

  • John: How would you even monitor every command?

    mdlInput_setMonitorFunction

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

  • Hi All,

    Trawling through past posts that mention 'dependency API' it looks like the callback functions were developed for associative elements like dimensions early on, and later revamped for V8, when the Dependency Manager appeared. See attached zip.

    At the moment, we have the beginnings of pervasive end-user programming (spearheaded by GC, and even Design++?), a lot more dynamic relationships between elements, either in the form of 1/. Graphic to graphic: Dynamic Views, GC symbolic views, XFM,  geometric constraints modeling in PowerCivils 2/. Graphic to non-graphic: To support bi-directional parametric updates between schedules and graphics, hot links between structural design and analysis apps, energy modeling feedback. etc 3/. Non-graphic to non-graphic: ProjectWise dependency tracking, OpenPlant data integration...Promis-E  associated document tracking...

    Managing change propagation is nothing new to coders, but how will end-user programming be integrated into the mix?

    GC's data modeling constructs are being embedded into the dgn. The last standalone version 8.11.8.202 has an interesting dialogue "Parametric Modeling (PM) Settings" that appears to give the user the option to control the propagation / dependencies between elements.  At the moment, if you dimension a GC construct associatively, Mstn bombs when there is a change. Apparently, the shadowy Bentley Interoperability Platform are working on gluing everything together, and the end user programming bits will be able propagate to and from the Bentley bits, in due course.

    MDL-only API: I guess this should change? I wonder how this is going to be implemented across the managed / non-managed code gulf. Will all Mstn elements like associative dimensions, patterns, feature solids etc be re-written as GC features? I guess that the Dependency API would become part of GC's DAG transaction manager? Will there need to be an overarching D-Cubed-style two-pass constraints manager that decides which order the dependency chains are fired, and on which core ? Will Garbage Collection / undo's / transactions need to be updated to cater for data modeling and well as the normal event-based scenario? The whole dotNet reflection, wrappers, Interops, overloading stuff seems like a huge uncharted 'no man's land' where a lot of grown men are on their knees poking the spot in front of them with a bayonet, hoping not to hit a mine.

    Hopefully, Bentley will be more transparent than Revit. Looking at some of the forum discussions, the dependency mechanism is not very well documented and a lot of plugin developers manage their dependencies independently, especially to avoid the dreaded 'regen all'. I hear CATIA is similarly opaque about its dependency management . Maybe things will be simpler with DAG-based tools like Grasshopper (and GC). GH is integrating its SDK into RhinoCommon for V5. GH is also interesting as it licences components from QuantumWhale, which is due incorporate LINQ . Who knows? Maybe T-Splines, RhinoDirect, RhinoParametrics and RhinoBIM will be able to feed off each other and allow the user to modify objects produced by the other plugins without losing their design intent / behaviour. I.e. no return to the old 'zombie' artifact days. Hello synergistic Interoperability.

    I was amazed to find out that LabView is a $600m company. They seem to be a pioneering force as far as integrating end-user programming (using visual programming interfaces, state charts etc) and professional coding, data modeling and even parallel processing. Anyone have experience with LabView? Or MZ-Platform?

     

    Dominic

     

     

     

     

    Dependency-Example.zip
  • National Instruments, Inc

    Dominic: I was amazed to find out that LabView is a $600m company. Anyone have experience with LabView?

    LabVIEW™ is a product — the vendor is National Instruments They've been around for about as long as Bentley Systems. Their speciality is instrumentation control and data acquisition.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions