Extraction Toolkit

optiSLang allows you to extend the Extraction Toolkit (ETK) interface by using common script interfaces.

The script files must fulfill the following naming conventions: *_cetk.py or *_etk.py.

To use the custom ETK interface, the scripts must be placed in one of the following locations:

  • [installation path]/scripting/integrations

  • Directories specified by SC_AlternativeCIDirectories configuration settings.

  • Directories specified by the environment variable OSL_ALT_CI_SEARCH_DIRS, separated by the native environment separator (; on Windows platforms or : on Linux platforms).

Custom ETK interfaces found in either one of these locations are loaded when the application starts and are then available for use within optiSLang.

Optionally, the following file types with the same filename and in the same directory can be used as:

  • Node icon (.svg, .jpg, .png, .jpeg, .ico, .bmp)

  • Documentation page in the help system (.html)

  • Configuration (.cfg)

The following functions are required in the Python script:

  • CheckFile(args)

    Checks the file format for auto-format detection.

    Inputs:Pathpath to file
    boolquick check
    Outputs:none 
  • ImportFile(args)

    Imports the file with the output to be extracted.

    Inputs:Pathpath to file
    Outputs:boolspecifies if the import was successful
  • GetNodeInfo(args)

    Gets the value of a node.

    Inputs:list of stringslist of node IDs to traverse tree-structure
    Outputs:listeach entry represents tree-path and value of an output
    * "tree-path": list of strings - list of child-node-IDs
    * "value": VariantD - value of node
    optional:
    * "meta-data": PyOSDesignPoint - name-value-pair of strings