• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

View System Events

Messages
1
Country
us-california
All,

I have a program in which I have multiple view windows open, and I cycle through those view windows to control things such as zoom utilizing the NEXT_VIEW and PREVIOUS_VIEW events. However, I have found that occasionally one of these events is silently dropped, and I wind up with a View-in-Control that I didn't expect. Is there an event to go to a known view (i.e. reset to view 00), or better yet, go to an assignable view (View 00, 01, or 02)? I've tried VIEW_RESET, but have been unable to figure out what it does (or maybe how to correctly use it).

Alternatively, is there a way to determine which view is currently selected?

Also, is there a way to determine the zoom level for the current view?

Finally, is there any way to use the SimConnect_CameraSetRelative6DOF command to control a view other than view 0?

Thank you in advance for any/all help!

-Nathan
 
If you're subscribed to the view event, it only reports the view upon the initial subscription or when you change the view. This works fine unless you have multiple views open. If you change focus to a different window it will not report the view mode.

What you can do in SimConnect is to unsubscribe and re-subscribe on a regular basis, like every 1/4 second or faster. You'll then regularly get the view mode of the currently focused window.

To use the SetCamera6Dof you need to switch to the view you want but there is no way of enumerating windows to definitively know the current window id. What you can do, if you're running in windowed mode and not full-screen is to use the Windows SDK calls to get the window title. Remember that foreign versions may use different text though. But the focused window is the only one you can use SetCamera6Dof on. This also effects the sound system though as sounds are always played according to the focused view's aspect on the aircraft.

There is no way of getting the current zoom setting. The only way is to count all zoom in and out steps and keep track yourself.

Si
 
Back
Top