[CONNECT .NET] How do I redraw a view using the DgnPlatformNet API?

With CONNECT SDK v10.13, I've adjusted a view's geometry like this using the DgnPlatformNet API...

viewInfo.SetGeometry(origin, elementDelta, rotation);
viewGroup.SetViewInformation(viewInfo, nView);
viewGroup.SynchViewDisplay (nView, false, true, false);

That appears to work OK. However, I have manually to redraw the view to see the change.   That is, I have to click the paintbrush icon in the UI to redraw the view.

What should I do programmatically to refresh a view after ViewGroup.SynchViewDisplay?

Redraw Using an InterOp

Here's one way, calling the VBA interface …

/// <summary>
/// Update the specified view using an InterOp calling the VBA interface.
/// </summary>
/// <param name="nView"> Zero-based view index.</param>
private void UpdateViewUsingInterOp (int nView)
{
    Bentley.Interop.MicroStationDGN.Application app = Utilities.ComApp;
    DesignFile dgnFile = app.ActiveDesignFile;
    Bentley.Interop.MicroStationDGN.Views views = dgnFile.Views;
    //  VBA views are 1-based
    View view = views[1 + nView];
    if (null != view)
        view.Redraw();

But why can't I do the same with .NET?

Parents Reply Children