VCF Automation Blog

from Stefan Schnell

Get all Properties of the SDKType Object


Here a tiny JavaScript routine which returns all properties of the object SDKType, when called with the argument this.
/**
 * Delivers all properties of the SDKType object.
 *
 * @author Stefan Schnell
 *
 * Checked with Aria Automation 8.5.1 and 8.12.0
 */

function getAllProperties(object) {

  /*
   * Prints all properties (including non-enumerable properties, except
   * for those which use Symbol) found directly in the given object, as
   * an array of strings.
   */

  var allProperties = Object.getOwnPropertyNames(object).sort();

  System.log(allProperties.length + " properties of " + object.toString());

  var output = "\n[\n";
  for (var i = 0; i < allProperties.length; i++) {
    if (i < allProperties.length - 1) {
      output += "  \"" + allProperties[i] + "\",\n";
    } else {
      output += "  \"" + allProperties[i] + "\"\n";
    }
  }
  output += "]";

  System.log(output);

}

getAllProperties(Object.getPrototypeOf(this));

vcf automation action to get all properties of the sdk type object with result
On this way, for example, we get 4308 properties in the HOL with the VCF Automation release 8.5.1 and 4029 properties with release 8.12.0. And as we can see, this approach also delivers the objects that are made available via the plugins.

vcf automation orchestrator api explorer with the sdk type object
Perhaps this is an interesting basis for further analysis.