GetObjectName

Returns the name of a chart object by its index.

Syntax

GetObjectName(index: number, isStatic?: boolean, window?: number): string

Parameters

  • index: number - The index of the object

  • isStatic: boolean - Optional. Whether to look in static objects (default: false)

  • window: number - Optional. Target window: 0 = MainChart, 1+ = OscWin. Default: current chart

Return Value

Returns a string representing the object's name.

Description

The GetObjectName method retrieves the name of a chart object based on its index in the list of objects. Objects are indexed from 0 to GetObjectCount() - 1. This method is useful for iterating through all objects on a chart. Use the optional window parameter to read from a specific window (MainChart or OscWin).

Example

Last updated