# SelectionCount()

Source: https://help.malighting.com/grandMA3/2.4/HTML/lua_objectfree_selectioncount.html
This is grandocs, an unofficial mirror of MA Lighting documentation. For authoritative or safety-relevant information, cite the canonical page on help.malighting.com.

---
## Description

The **SelectionCount** Lua function returns a number indicating the total amount of currently selected fixtures.

## Arguments

This function does not accept any arguments.

## Return

- **Integer**:\
  The function returns an integer number depicting the total amount of fixtures in the current selection.\
  If there is no selection, then it returns 0.

## Example

This example prints the number of fixtures in the current selection to the Command Line History:

|                                                                                                            |
| ---------------------------------------------------------------------------------------------------------- |
| [Copy Code](javascript:void\(0\))Lua                                                                       |
| ```
return function()
	Printf('Number of fixtures in the current selection: %i', SelectionCount())
end
``` |