[CONNECT C++] ViewGroups and ViewInfo

When we do something like this (taken from SDK ..\Visualization\DisplayStyleExample)...

    ViewGroupCollectionCR viewGroups = dgnFile->GetViewGroups();
    ViewGroupPtr viewGroup = viewGroups.GetActiveP();
    if (!viewGroup.IsValid())
        return;
    int viewIndex = 0;
    ViewInfoR viewInfo = viewGroup->GetViewInfoR (viewIndex);
  • Is the active ViewGroup always available when MicroStation has a DGN file open?
  • Do all eight ViewInfo instances exist even when some views are closed?
Parents
  • > Is the active ViewGroup always available when MicroStation has a DGN file open?

    It should be, the active view group is made active when a file is opened...but you should always check that you have a valid ptr...

    > Do all eight ViewInfo instances exist even when some views are closed?

    Closed or open, there will always be a ViewInfo for views 0-7, that's why it can return a reference instead of a pointer (the on/off state is a ViewFlag).

    That said, it's possible for a ViewGroup to not define all 8 views (usually see this w/DWG files), information about whether a view is defined comes from the ViewPortInfo.

    -B



    Answer Verified By: Jon Summers 

Reply
  • > Is the active ViewGroup always available when MicroStation has a DGN file open?

    It should be, the active view group is made active when a file is opened...but you should always check that you have a valid ptr...

    > Do all eight ViewInfo instances exist even when some views are closed?

    Closed or open, there will always be a ViewInfo for views 0-7, that's why it can return a reference instead of a pointer (the on/off state is a ViewFlag).

    That said, it's possible for a ViewGroup to not define all 8 views (usually see this w/DWG files), information about whether a view is defined comes from the ViewPortInfo.

    -B



    Answer Verified By: Jon Summers 

Children
No Data