Skip to main content

system.kanoa.asset.addMode

This function requires KanoaOPS module

Description

Adds a new mode (kanoaOPS).

Syntax

addMode(modeInfo, userId)
  • Parameters
      modeInfo (dictionary) - Dictionary containing mode information.
      userId (int) - User ID for tracking changes.
  • Returns
      modeId (int).
  • Code Examples

    # Example Usage:
    mode_info = {
    'modeName': 'NewMode',
    'modeTypeId': 1,
    'enabled': True,
    'canSelect': True,
    'canSchedule': False,
    'modeColor': '#00FF00',
    'iconPath': '/path/to/icon'
    }
    user_id = 5
    mode_id = system.kanoa.asset.addMode(mode_info, user_id)