kingm56 Posted 22 hours ago Report Posted 22 hours ago Good evening, Paul. First, thank you for all your help to date; I truly appreciate it! I wanted to ask if your DLL allows reading SIMVARs in MSFS. I know that John provides a method using myOffsets.txt, but that file needs to be placed in the FSUIPC directory, which isn't ideal for an application used by multiple people. Would your DLL provide a way to access SIMVARs directly without relying on myOffsets.txt? I don't need to write to them, just read. Thanks for your time!
Paul Henty Posted 14 hours ago Report Posted 14 hours ago Unfortunately my DLL cannot do this. To read SIMVARS directly I would need to add my own SimConnect connection into the DLL which is not a road I want to go down. Maybe @John Dowson could consider adding some offsets so programmers can add 'simvar to offset' mappings via the IPC interface, in addition to the myOffsets.txt file. e.g. write the simvar name, size, type, destination offset etc. to a series of offsets and this would add that mapping until FSUIPC was closed, just as if they had been included in myOffsets.txt. Paul
John Dowson Posted 13 hours ago Report Posted 13 hours ago 1 minute ago, Paul Henty said: Maybe @John Dowson could consider adding some offsets so programmers can add 'simvar to offset' mappings via the IPC interface, in addition to the myOffsets.txt file. e.g. write the simvar name, size, type, destination offset etc. to a series of offsets and this would add that mapping until FSUIPC was closed, just as if they had been included in myOffsets.txt. Currently all simvars are requested during initialsation, after FSUIPC has obtained a connection to the FS. The problem with such a feature is that the whole way that simvars are requested would need to be change, as this would have to allow for updating the data definitions (plus the internal data structures that map simvars to offsets) dynamically, which would be a huge change. This is probably possible but would require a complete re-design of how this currently works, and I just don't have the time (and probably never will) to consider such a change. You should consider just distributing your myOffsets.txt file with the application, or write or update that file when the app is installed. Of course, there is always a possible issue if the offset was already being used for another purpose. But this would apply when the simvars are requested via offsets as it applies when requested via the myOffsets.txt file. There is another method that can be used to get the value of any simvar - write the value to an lvar and read the lvar. This involves an extra step in writing the simvar to an lvar, which can be achieved via executing some calculator code of the form: (A:someSimvar) (>:L:mySimvarLvar) and then read the value from the lvar L:mySimvarLvar. But doing this, you would need to write the a:var/simvar value to the lvar every time before you read the lvar to make sure that it holds the current value, and there would be a slight delay before the updated lvar value would be available in FSUIPC. John
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now