[MSCE 10.16 c/c++] How to force dynamics?

Hi there,

I'm writting an app that changes active Z in the view 0 (Top view) through mouse wheel events. When that happens, some other views (not TOP) are updated, and everything works fine.

The problem comes when I'm using it in conjuction with any Microstation command (i.e: place lstring). As far as the mouse moves in XY, the command dynamics works fime, but when I change the active Z through my app, the command dynamics is not triggered.

As far as I have read, it seems the normal behavior, but I'd like to force dinamics to start as I'm working with other views that are not TOP and should be updated dynamically when I change the Z in the TOP view. I've read in the forum about "mdlInput_simulateCursorMotion", which seems to do exacly what I need but I'm not abre to find it in any header. Is it removed from the API? Is there an alternative in Connect? Any suggestion or workaround will be appreciated. I'm working with MSCE 10.16

Thanks in advance and best regards

Parents
  • Hi Oscar,

    at first, please follow the forum best practices. There is well established subject structure, providing clear information about used product, its version and API. It's much better than to use tags, where the information can be missed easily.

    Without sharing the code, it's hard to guess what are you doing.

    Because you mention you want to work in conjunction with other tool, does it mean you implement DgnViewTool class?

    Whatever is mdl<antyhing> should be treated as obsolete, because (typically) there is better C++ object API.

    With regards,

      Jan

  • Hi Jan,

    Thanks for your advices. I'll try to keep them in mind for the future. About the matter at hand, it's probably my fault. I have not explained the problem clearly enough. I'll try to be more specific:

    Is there any way to force dynamics to happen, programmatically, (aside from moving mouse in the window) in Microstation CE Update 16 as it was suggested by Brien Bastings in past posts, using "mdlInput_simulateCursorMotion" (I can't find this one in current version)?

    Thanks in advance and best regards

  • Hi Oscar,

    Is there any way to force dynamics to happen, programmatically

    Because we are in Programming forum, I understand "dynamics" as the name for a mode, when code is able to draw elements to view(s) dynamically. This mode is started and ended by the code itself, but it can be done only when specific conditions are fulfilled.

    In MicroStation CE, dynamics is used when DgnTool class (DgnPrimitiveTool, DgnElementSetTool etc.) is implemented.

    suggested by Brien Bastings in past posts

    When you mention past post(s), it would be nice to share a linke to such discussion to make context clear.

    using "mdlInput_simulateCursorMotion" (I can't find this one in current version)?

    This method is not related to dynamics itself (it does not start or modify the dynamics mode), but it does exactly what its name tells: It sends to MIcroStation input queue "mouse moved" simulated event. So when dynamics is active (because active tool use it), it typically trigger view(s) update.

    Is there any way to force dynamics to happen

    To draw anything in dynamics, your code must start it, receive "frame update" event and to redraw dynamic elements.

    I'm writting an app that changes active Z in the view 0

    I must repeat my question, because it's crucial: Because "change active Z"  is view operation (btw why you use this obsolete feature?), do you implement own view tool? Or you try to hack existing "set view active Z" tool, and only simulate user interaction?

    With regards,

      Jan

Reply
  • Hi Oscar,

    Is there any way to force dynamics to happen, programmatically

    Because we are in Programming forum, I understand "dynamics" as the name for a mode, when code is able to draw elements to view(s) dynamically. This mode is started and ended by the code itself, but it can be done only when specific conditions are fulfilled.

    In MicroStation CE, dynamics is used when DgnTool class (DgnPrimitiveTool, DgnElementSetTool etc.) is implemented.

    suggested by Brien Bastings in past posts

    When you mention past post(s), it would be nice to share a linke to such discussion to make context clear.

    using "mdlInput_simulateCursorMotion" (I can't find this one in current version)?

    This method is not related to dynamics itself (it does not start or modify the dynamics mode), but it does exactly what its name tells: It sends to MIcroStation input queue "mouse moved" simulated event. So when dynamics is active (because active tool use it), it typically trigger view(s) update.

    Is there any way to force dynamics to happen

    To draw anything in dynamics, your code must start it, receive "frame update" event and to redraw dynamic elements.

    I'm writting an app that changes active Z in the view 0

    I must repeat my question, because it's crucial: Because "change active Z"  is view operation (btw why you use this obsolete feature?), do you implement own view tool? Or you try to hack existing "set view active Z" tool, and only simulate user interaction?

    With regards,

      Jan

Children
No Data