InoDrive / UserApp / update_variables_list


InoDrive.UserApp.update_variables_list(self)

Sends message to Module to Update all Read or Read/Write Variable Listing.

Arguments: self (Object): Reference to User Application Instance.

Returns: Boolean – True or False Value on Updating the Variable Listing.

import CkInoDriveAPI

# Instantiate InoDrive Object and Connect by Name
Drive = CkInoDriveAPI.InoDrive(target='Name', autoConnect=True)

# Update Variable List
result = Drive.UserApp.update_variables_list()

if result:
    # Get All Variables
    var_list = Drive.UserApp.get_all_variables()
    # Read Each Variable
    for item in var_list['items']:
        value = Drive.UserApp.read_var(item)
        print(f"Variable {item}'s value is {value}.")