InoDrive / UserApp / readVar


InoDrive.UserApp.readVar(argv)

Read Variable(s) value by Name or ID in User Application, polls Variable List

Arguments:

Argv (String), Argument can be a single Variable Name (String) or a ID (Integer). Can also be a List of Variable Name’s or ID’s.
Props (String/Number) Property Assigned to the Variable (not the name of the property, but the property itself, i.e. 23, true, etc.,)

Returns: Variable Value (Boolean, Integer, Floating Point) Value of the variable named

// Import InoDrive API Library
 import { InoDriveApiJS }  from ( "ck-inodrive-api" ) 

// Instatiate the API
let InoDriveApi = new InoDriveApiJS.InoDriveApi({ connectAppUrl: "", secure: false })

// Instantiate InoDrive Object
Drive = await InoDriveApi.InoDrive({target:'Name', autoConnect:True})

// Read Single Variable by Name
Drive.readVar("TestVariable2")

// Or Read Multiple Variable’s by Array
console.log(await Drive.readVar([1, 2]))