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.
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.
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
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?
AFAIK there's no way to intercept the dynamics event of another MDL task.
Why do you want to do that?
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
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
How would you even monitor every function?
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.
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.
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