[MStn CE U16 C#] Force to update (redraw) shared cell instances

Hi,

we have a bit specific situation: In DgnElementSetTool (so CE NET API is used), to modify cell content, the code must jump to Interop (because it does not work in NET API).

We discovered that when shared cell instance is selected (so its definition is found and modified), only this specific instance is updated to reflect the definition changes. But other shared cell instances remain in the old state until they are selected, design file is reopened etc.

I did not do any detail analysis yet, but I assume it is because the tool state machine is not aware of the modification, because it's done in another API.

Is there any way how to request MicroStation to update shared cell instances available?

With regards,

  Jan

Parents
  • Is there any way how to request MicroStation to update shared cell instances available?

    Try DependencyManager.ProcessAffected.

    This function invokes dependency callbacks on all dependent elements affected by changes to root elements since the last call to this function.

    It's just a guess, but easy to try.

     
    Regards, Jon Summers
    LA Solutions

  • This function invokes dependency callbacks on all dependent elements affected by changes to root elements since the last call to this function.

    A standard named shared cell is not required to have an explicit dependency on the shared cell definition as it's found by name look up, so this won't help in those cases.

    I did not do any detail analysis yet, but I assume it is because the tool state machine is not aware of the modification, because it's done in another API.

    Changes to the shared cell definition are not monitored to automatically find/update every instance. Tools that modify the shared cell definition in a way that affects display (which isn't that common) need to specially iterate the instances, update their range (ex. DisplayHandler::ValidateElementRange (elP, modelRef, true)) and rewrite them. There might be a method or mdl function does this, I can't think of one off hand though, as I said, it's not that common to modify a shared cell definition.

    HTH

    -B



Reply
  • This function invokes dependency callbacks on all dependent elements affected by changes to root elements since the last call to this function.

    A standard named shared cell is not required to have an explicit dependency on the shared cell definition as it's found by name look up, so this won't help in those cases.

    I did not do any detail analysis yet, but I assume it is because the tool state machine is not aware of the modification, because it's done in another API.

    Changes to the shared cell definition are not monitored to automatically find/update every instance. Tools that modify the shared cell definition in a way that affects display (which isn't that common) need to specially iterate the instances, update their range (ex. DisplayHandler::ValidateElementRange (elP, modelRef, true)) and rewrite them. There might be a method or mdl function does this, I can't think of one off hand though, as I said, it's not that common to modify a shared cell definition.

    HTH

    -B



Children