The DgnPlatformNet ViewPort class documentation includes this note: To update the view, see IViewManager::UpdateView or IViewManager::UpdateViewDynamic.
But IViewManager is part of the C++ MicroStationAPI, not part of DgnPlatformNet. There isn't a documented ViewManager for .NET.
Unknown said: There is a DgnDisplayNET wrapper API
Thanks! I've referenced Bentley.DgnDisplayNet.dll...
However, the compiler tells me error CS0234: The type or namespace name 'DgnDisplayNET' does not exist in the namespace 'Bentley' (are you missing an assembly reference?)
P.S. Why doesn't ViewPort have an Update() method?
Regards, Jon Summers LA Solutions
Unknown said:The native DgnViewport class does not have an Update() function - why would you expect the managed equivalent to have one?
It's not a matter of expectation but hope. Isn't updating a view rather fundamental to the way MicroStation works?
I might criticise the MicroStationAPI for the same reason. If a ViewPort controls a View, why can't it tell it to Update?
Unknown said:Isn't updating a view rather fundamental to the way MicroStation works?
No, when was the last time you had to click on the Update View icon while drawing? The views are automatically healed to reflect changes to persistent elements. Forcing full view updates means making the user wait until the update completes before they can do anything; full updates are to be avoided when possible.
-B
Unknown said: Maybe you should describe why you feel you need to update the viewport
I'm attempting to focus a view on a particular element. Here's where I'm setting the view origin & extent...
viewInfo.SetGeometry(elementCentre, elementDelta, rotation); viewGroup.SetViewInformation(viewInfo, nView); viewGroup.SaveChanges(); viewGroup.SynchViewDisplay(nView, false, true, false);
When I run the code I see no change in the view. If I update the view manually, I see the view focus on the element. My assumption is that I need to update the view after SynchViewDisplay().
Unknown said:No, when was the last time you had to click on the Update View icon while drawing?
I'm not drawing. I've changed view parameters and want to see the new display, which appears not to happen automatically.
David Larson
Unknown said:Would sending a keyin do as a workaround for now?
Thanks! However, I'm exercising the DgnPlatformNet as far as possible. I prefer to find what that API can do without resorting to queuing key-ins. After all, if we use only key-ins, we might as well record a VBA macro and forget the path to .NET enlightenment 8-)