InoDrive / UserApp / get_variable
InoDrive.UserApp.get_variable(self, id=None)
Get specific Variable in User Application that are set to Read or Read/Write by Name or ID. Does not poll Variable List.
Arguments:
• self (Object): Reference to User Application Instance.
• id (String or Integer): Argument to get Variable by either it’s Name or ID.
Returns: Dict – Dictionary containing Variable’s ID, Type, Access Level, Value, and Write Permission.
import CkInoDriveAPI # Instantiate InoDrive Object and Connect by Name Drive = CkInoDriveAPI.InoDrive(target='Name', autoConnect=True) # Start polling User Application Drive.UserApp.start_poll() # Retrieve Variable by ID var = Drive.UserApp.get_variable(0) # Retrieve Variable by Name var = Drive.UserApp.get_variable('foo')