InoDrive / UserApp / getVar


InoDrive.UserApp.getVar(argv)

Get Variable(s) value by name or id in User Application, does not poll User Application Variable List.

Arguments:
argv/props Argument can be a single Variable Name (String) or a ID (Integer). Can also be a List of Variable Name’s or ID’s.
Float Precision (Integer): (Optional) Keyword argument to round up floating point value to nearest digit.

Returns: Object Value(s) of the variable(s) that you’ve specifically called for

// 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})

// Get Multiple Variables Value by ID
Drive.UserApp.getVar([0, 1, 2])

// Get Specific Variable Value by Name
console.log(Drive.UserApp.getVar(["TestVariable"]))