June 23, 201510 yr I've look in the SDK but can't find a call to read the current VC zoom level setting...is there a way to read it? I also would like to set a VC zoom value and am wondering if this possible as well? Thanks... Ralph Freshour www.GMTPilots.com
June 24, 201510 yr Author So, this is what I've learned so far in case others are interested in this topic: 1. Microsoft didn't provide a way to read or get the current zoom level in SimConnect. Period. 2. There is only one call constant (ZOOM1_X) to set the zoom level. I'm programming in C# but I'll bet the C++ header file for this constant == 64. This constant sets the zoom level to 1.0. 3. While there is only one documented constant (ZOOM1_X)...you can send any integer value and get incremental zoom levels. For example, send 32 to get .5 zoom level. So, I guess I've now answered my own question. Ralph Freshour www.GMTPilots.com
June 26, 201510 yr Author I'm wondering if someone could help me with actually implementing this 1.0 zoom level? I'm doing this in C# and here is my code...I'm just trying to do a button click to set the zoom level but my code isn't working. I'm not sure where the problem is. Thanks for any help. enum EVENTS : uint { ZOOM_1X, }; simconnect.MapClientEventToSimEvent(EVENTS.ZOOM_1X, "ZOOM_1X"); simconnect.TransmitClientEvent((uint)SimConnect.SIMCONNECT_OBJECT_ID_USER, EVENTS.ZOOM_1X, (uint)0, INPUT_GROUPS.INPUT0, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY); Ralph Freshour www.GMTPilots.com
November 19, 20169 yr I know this is old, but this was helpful, and I figured out how to make the above examples work: enum EVENT_ID { ZOOM_1X } simconnect.TransmitClientEvent(SimConnect.SIMCONNECT_OBJECT_ID_USER, EVENT_ID.ZOOM_1X, 0, GROUP_ID.GROUP1, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY); I didn't cast anything and my enums are not uint derived. Not sure if that makes any difference but it works for me. I also figured out how to do more than just set the zoom to 1X. There are other zoom events. Specifically ZOOM_IN and ZOOM_OUT, except that they are backwards. ZOOM_IN zooms out and ZOOM_OUT actually zooms in. enum EVENT_ID { ZOOM_IN, ZOOM_OUT } //DEFINE EVENT simconnect.MapClientEventToSimEvent(EVENT_ID.ZOOM_IN, "ZOOM_OUT"); simconnect.MapClientEventToSimEvent(EVENT_ID.ZOOM_OUT, "ZOOM_IN"); //TRIGGER EVENTS simconnect.TransmitClientEvent(SimConnect.SIMCONNECT_OBJECT_ID_USER, EVENT_ID.ZOOM_IN, 0, GROUP_ID.GROUP1, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY); simconnect.TransmitClientEvent(SimConnect.SIMCONNECT_OBJECT_ID_USER, EVENT_ID.ZOOM_OUT, 0, GROUP_ID.GROUP1, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY); To get to .3x zoom, just set the zoom to 1X, then zoom out a few times (7 times, to be exact). Hopefully this helps some people!
November 24, 20169 yr Nah, you don't do it like that. That's tedious. You do it like this using the secret event: P3D_simconnect.MapClientEventToSimEvent(EVENT_ID.EVENT_ZoomSet, "VIEW_ZOOM_SET") P3D_simconnect.TransmitClientEvent(DEFINITIONS.Struct1, EVENT_ID.EVENT_ZoomSet, ZoomLevel * 64, hSimconnect.Group1, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY)
Archived
This topic is now archived and is closed to further replies.