Hello all!
I am newbie and trying to create my first addins for MicroStation. I used Jon Summers's article to focus view on element (Big thanks!).
According this article I have to update views to see my element in the right view. It works perfectly
public static void UpdateViews(ViewGroup vgSource, ViewGroupCollection vGroups, ViewInformation viewInformation, int viewNumber) { ViewGroup viewGroup = new ViewGroup(model, true, "Transient", false); ViewGroupCopyOptions options = new ViewGroupCopyOptions(); options.NewName = "Transient"; viewGroup.From(vgSource, options); viewGroup.SetViewInformation(viewInformation, viewNumber); ViewGroupStatus status = vGroups.MakeActive(viewGroup, false); }
But there is one problem. After updating focused view is changed. How can I set focus back (to view with desired number)?