May 22, 200719 yr Hello ! I need change simulation rate to my value. I use delphi FSCsimconnect component. I send new value to simconnect and receive EXCEPTIOM=20 error. When i receive this variable it work normally and i receive current value of this variable. My method for send :After connect to sim i define new group 2004 for work with SIMULATION RATE value.SimConnect.AddDataDefinition (2004, 'SIMULATION RATE', 'number', SIMCONNECT_DATATYPE_FLOAT64); Return = OK. then i press button1 and send this:form1.SimConnect.PrepareData (2004, 1); // prepare data for 2004 groupform1.SimConnect.SetDataDouble (0, 0,1.000);// send to this group value 1.000 - it is a 1x of simulation speed;form1.SimConnect.SetDataOnSimObject (SIMCONNECT_OBJECT_ID_USER) ;// send this data to FS . After send it, i receive EXCEPTION 20 and this method not work. I not see any changes in FS. BUT !!!!!If i read this variable - IT IS WORK NORMALLY ! read method:When press Button2 i send to simconnect this :simconnect.RequestDataOnSimObject(10000, 2004, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_ONCE, SIMCONNECT_DATA_REQUEST_FLAG_CHANGED, 0, 0, 0);and then receive under SimobjectID 10000 header data of this variable:value:=simconnect.GetDataDouble(0,0);After this i have current value of SIMULATOR RATE in "value" variable at float64 datatype. Please explain me . Why i get EXCEPTION 20 when send new value ??I use another DATATYPEs : String8 , and etc. and i receive exception=20 always. It is a internal bug of simconnect ? Please help me !
May 23, 200719 yr Commercial Member >After this i have current value of SIMULATOR RATE in "value">variable at float64 datatype. >>Please explain me . Why i get EXCEPTION 20 when send new valueAccording to he SimConnect SDK documentation, that variable is not "Settable" (see the Simulation Variables list, the "N" under "Settable").Many of the SimVars are readable but not settable. This generally applies to those values which can be set by an Event instead. Microsoft prefer you to use the event system where it is available. Currently, although listed in the GAUGES.H file (for panel making), the KEY_SIM_RATE_SET event doesn't work (although I've not tested it since the SP1 update -- it might do now. Worth a try). I had to make do with these two events, loops to the nearest figure to that needed:KEY_SIM_RATE_INCRKEY_SIM_RATE_DECRRegardsPete Win10: 22H2 19045.2728 CPU: 9900KS at 5.5GHz Memory: 32Gb at 3800 MHz. GPU: RTX 24Gb Titan 2 x 2160p projectors at 25Hz onto 200 FOV curved screen
May 23, 200719 yr Commercial Member >Currently, although listed in the GAUGES.H file (for panel>making), the KEY_SIM_RATE_SET event doesn't work (although>I've not tested it since the SP1 update -- it might do now.>Worth a try).No, it still doesn't work. I tried it with SP1 installed.It is on a list of SimConnect bugs to fix I expect, just not very high in priority.RegardsPete Win10: 22H2 19045.2728 CPU: 9900KS at 5.5GHz Memory: 32Gb at 3800 MHz. GPU: RTX 24Gb Titan 2 x 2160p projectors at 25Hz onto 200 FOV curved screen
Create an account or sign in to comment