I am using the ExampleCreateTool example to draw a line and center the view as you draw. My issue is with raster imagery that will not fully update as it re-centers the view. Here is the code
/*---------------------------------------------------------------------------------**//** * @bsimethod Bentley Systems +---------------+---------------+---------------+---------------+---------------+------*/ bool ExampleCreateLineStringTool::_OnDataButton (DgnButtonEventCR ev) { if (0 == m_points.size ()) { _BeginDynamics (); // Start dynamics on first point. Enables AccuDraw and triggers _OnDynamicFrame being called. EnableUndoPreviousStep (); // Enable Ctrl+Z notification to undo the previous data point. } m_points.push_back (*ev.GetPoint ()); SetupAndPromptForNextAction (); CreateAcceptedSegmentsTransient (); IndexedViewportP vp = ev.GetViewport(); if (!vp) return false; // Sub-classes may ascribe special meaning to this status, it's not checked by DgnViewTool. DPoint3d centerPt = *ev.GetPoint(); // The DgnButtonEvent point is always ACTIVE coords. vp->ActiveToRoot(¢erPt, ¢erPt, 1); // Need point in ROOT coords for new zoom center (ACTIVE != ROOT when a reference is activated). vp->Zoom(¢erPt, 1.0, true); // Change the frustum for this viewport by tje supplied scale factor, does not update the view. vp->SynchWithViewInfo(true, true); // Add entry to view undo stack so that view previous can nr used to get back to the current view. IndexedViewSet::FullUpdateInfo info; info.SetStartEndMsg(true); // View tools should output progress/display complete messages... IViewManager::GetActiveViewSet().UpdateView(vp, DRAW_MODE_Normal, DrawPurpose::Update, info); // Update the display by doing a full update. return false; }
Also here is a video showing the issue
https://ray-westwoodps.tinytake.com/tt/NTE0NjkzOV8xNjEzMjU2Mg