Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[CONNECT C# Addin] Focus on desired view

$
0
0

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)?


Viewing all articles
Browse latest Browse all 7260

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>