Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

need help with accessing C:Vars in SimConnect

Featured Replies

Hello All,

 First of all i'd like to thank you all for taking your time to look at this post. Any help is highly appreciated. 

I am using VRS tackpack and i need some custom vars, C:Vars to be retrieved into my simconnect exe app. How can i achieve this? In their SDK they point to the following, i am new to c++, have been able to play around with SimConnect quite a bit, however i need to get those C:Vars into SimConnect. Is there any way i can make this happen? I've seen mentions of looking at the mixedmode example in the sdk (cabin comfort). I've looked into it and tried to understand, however, i have not been able to understand the code properly. Is there any described example or can anyone point me in a direction that would allow me to pull CVars from VRS TacPack? 

Also ran into this: http://www.prepar3d.com/forum/viewtopic.php?f=6311&t=135650

In this case, the OP is working with the data harvester example i think to implement this. is mixing the PDK and C Gauges going to work as well? or do i have to build on top of a C Gauges example?

This is code i found on the VRS TacPack SDK...  

#include "gauges.h"

//NOTE: very simplified code will all error checking omitted.
//This is just to give you an idea of what's involved, and not intended to be used directly.

IPanelCCallback *pPCC_TPUtil = panel_get_registered_c_callback("VRSTP_Util");
IAircraftCCallback *pACC_TPUtil = pPCC_TPUtil->CreateAircraftCCallback(0);
IGaugeCCallback *pGCC_TPUtil = pACC_TPUtil->CreateGaugeCCallback();

//First we need the property ID of the CVar we're going to interact with
//NOTE: CVar IDs only change at certain definable points (ie, aircraft reloads, etc)
//      so you do NOT have to convert from string to ID every frame
SINT32 ID = 0;
pPCC_TPUtil->ConvertStringToProperty("MoaName", &ID);

//Writing string data to a CVar ala: 'TestName' (>C:VRSTP_Util:MoaName, string)
char szVal[] = "TestName";
pGCC_TPUtil->SetPropertyValue(ID, szVal);

//Reading string data from a CVar ala: (C:VRSTP_Util:MoaName, string)
PCSTRINGZ pS = NULL;
pGCC_TPUtil->GetPropertyValue(ID, &pS);
printf("MoaName: %s\n", pS);  //Should print "MoaName: TestName"
.......
https://forums.vrsimulations.com/support/index.php/TacPack_SDK

Please suggest. 


Once again, thank you for all the help. 

 

Kind Regards
Vamshi

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.