Skip to main content

system.kanoa.asset.copyAsset

This function requires KanoaOPS module

Description

Makes a copy of the passed-in assetId. This will be an identical copy including all the child assets, links to modes, states, items, and attributes (kanoaOPS).

Syntax

copyAsset(assetId, userId)
  • Parameters
      assetId (int) - ID of the asset to copy.
      userId (int) - User ID.
  • Returns
      newAssetId (int) - The newly created asset ID.
  • Code Examples

    # Example Usage:
    asset_id = 123
    user_id = 456
    new_asset_id = system.kanoa.asset.copyAsset(asset_id, user_id)