• 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.

Current View Mode

Messages
531
Country
france
I would like to know what is the current view mode, the most important for is to know if the 2D cockpit view is currently used or not.
In FS2004, we had P:ACTIVE VIEW MODE. As this does not work any more in FSX, is there another way to get this information in FSX?

Thanks for any help :)

Eric
 
Eric,

In C use

is_panel_window_visible_ident(n) ;

With this, you can check to see if any particular panel ident is on screen, assuming of course that every [Windownn] and [VCockpitnn} has a valid ident= entry... ;)

Unfortunately, it appears that there is currently no provision for a similar return in the XML Schema... :eek:
 
Hello Bill,

This is the workaround I used already, but there is a possible problem: if the user is in VC mode and presses Shift-X to popup a panel window, you might think the 2D panel mode is used. But the probability that it happens is very low if you look at the visibility of the main panel (I don't know any pilot who pops up the main panel in VC mode...)

BTW, are you sure the [VCockpitXX] section can have an ident? This is not mentioned in the SDK.

Thanks,
Eric
 
With SimConnect you can trap the view system state. This returns the state immediately or whenever the user changes the view. However, this doesn't work if the user has more than one window open. So if the user cycles the views in one window it's ok, but if they have two windows open and they change focus from one to the other, the state doesn't change. (But that may or may not be a problem for you.)

Si
 
BTW, are you sure the [VCockpitXX] section can have an ident? This is not mentioned in the SDK.

Thanks,
Eric

Er, yes it is mentioned (sort of):

[window00] and [vcockpit00]
This section describes a panel window, including its shape, position, properties, the background image, and what gauges belong to the panel. The same structure is used for Virtual Cockpits, with the single addition of the texture parameter.

Looking through the list of available paramaters, ident= is listed as available...

Also, I've tested the "theory" and found that it does indeed work. ;)

Of course, as it happens all [Vcockpitnn] sections are active anytime the 2d panel isn't, so it's only really necessary to check:

Code:
if ( !is_panel_window_visible_ident(0) )
	{ vc_active = 1 ; }
else
	{ vc_active = 0 ; }
 
Bill,

I have just tested the VC visibility using the "ident". In the panel.cfg, I have defined an ident for the [VCockpit01] window. Then I used "is_panel_window_visible_ident" to check if the VC window is visible. And it does not work...

In fs9 and FSX, the result is the same. is_panel_window_visible_ident always returns false, even when the VC is active. So it appears the "ident" parameter is just ignored for the [VCockpitXX]sections.

So guess the only solution is to use SimConnect in FSX to know what view mode is active :mad:

Eric
 
Back
Top