> For the complete documentation index, see [llms.txt](https://raia-software-inc.gitbook.io/tacview-2-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raia-software-inc.gitbook.io/tacview-2-documentation/api-reference/api-reference/telemetry/is-telemetry-empty.md).

# IsTelemetryEmpty()

Returns whether the current telemetry contains no data.

## Syntax

```lua
isEmpty = IsTelemetryEmpty()
```

## Parameters

This function has no parameters.

## Return value

Type: `boolean`

Returns `true` when the telemetry is empty.

Returns `false` as soon as there is any telemetry data available.

This includes temporal telemetry, atemporal telemetry, metadata, or even an object without transform samples.

## Remarks

`IsTelemetryEmpty()` answers the broadest telemetry availability question:

```
Is there anything loaded or available at all?
```

It does not require temporal data.

A telemetry document can be non-empty even if it contains no transform samples. For example, it may contain atemporal objects, reference points, metadata, or other non-temporal information.

Use this function when an add-on only needs to know whether there is something to work with.

It is useful for enabling or disabling general commands such as saving, exporting, clearing, opening document tools, or showing interface controls that only make sense when telemetry data exists.

If your add-on specifically needs time-based data, use `IsTemporalTelemetryAvailable()` instead.

## One check for one decision

Use the helper that matches the question your add-on is asking.

If you only need to know whether any telemetry exists, call `IsTelemetryEmpty()`.

If you need to know whether temporal telemetry exists, call `IsTemporalTelemetryAvailable()`.

If you need the actual transform time range, call `GetTransformTimeRange()` and decide from the values it returned.

Keeping each decision based on one clear source makes the code easier to read and avoids mixing answers that may have been produced at different moments.

## Example

This example enables a menu item only when telemetry data exists.

```lua
local mainMenuHandle = GetMainMenuHandle()

if mainMenuHandle then

	SetMenuItemEnabled(mainMenuHandle, "SaveTelemetry", not IsTelemetryEmpty())

end
```

## Example

This example stops early when the add-on has nothing to process.

```lua
if IsTelemetryEmpty() then

	LogInformation("No telemetry is available.")
	return

end

-- Continue with commands that can work with any telemetry data.
```

## See also

* `IsTemporalTelemetryAvailable()`
* `GetTransformTimeRange()`
