Jump to content

How can I read argument values from Devices other then Mainpanel/Device(0)?

Recommended Posts



I'll try avoid to doublepost entries in several threads so just a link below for background info:



- Is there a way/method/syntax to find out the LUA Argument value of some switches on panels outside the mainpanel?

Going through same method I used in the A-10 Module that worked ok gives me 'NIL' in response here in the AJS37.  


I can set a value through LUA but fail to extract same or any other besides those on Device(0). Below response is through LUA Console in DCS:BIOS HUB (I'll get the same response using DCS Witchcraft Console in older version of DCS:BIOS  

as example:
returnValue = GetDevice(31):get_argument_value(3307)
return returnvalue


The response is:
Response:runtime error
1 | [string "Lua Console Snippet"]:2: attempt to call mathod 'get_argument_value' (a nil value)


Reason for this is to find a way to sync the virtual cockpit settings to the 'switches' in the physical cockpit.

(I can't find a way to set rotaries/multipos switches, FR22 group and base selectors etc to a fixed position in DCS. Only see the step-up/down keybindings)


Hoping for some guidence in either how to grab the device()-Argument-values or to set a fixed position setting through LUA

Someone here that can help out?


All the best








  • Like 1

- - - -

Link to comment
Share on other sites

Posted (edited)
On 3/12/2021 at 7:14 PM, outbaxx said:


A beautiful approach by Blue73, thanks for pointing it out, missed that until now, could really be handy in other projects but not directly applicable in this case due to use of SIOC/IOCards. DCS:BIOS is not ruled out yet, will likely be cases I can't solve through Oakes scripts and LUA so option is valid.


The method is somewhat like a french (speaking) guy made for IOCards to trigger a resync of active state of inputs to update SIOC from input states to sync to connected SIMs. I'll hook it here just in case some other SIOC nerd find it a future search, in French though; -). In short that update the SIM virtual cockpit from physical settings of switches etc. 


And I haven't given up hope yet to either to find a solution on read status of the panel switches etc in the virtual cockpit or that controls will be added in future release for those that's missing today. Long journey ahead still for us 🙂


There are some LUA functions visible/addressable per panels such as 'GetCommand' etc that might be a way forward but don't know what they do or why, played around with them but no success there (I got a long way to walk on the LUA path still)





Pb reload SIOC.pdf

Edited by Duckling

- - - -

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...