revitron.selection

A small helper submodule to simplify accessing the list of selected elements.

Classes:

Selection()

A selection helper class.

class Selection[source]

Bases: object

A selection helper class.

Example:

for element in revitron.Selection.get():
        ...

Methods:

first()

Get the first elements of the list of selected elements.

get()

Get the currently selected elements.

set(ids)

Set the selection to a list of element ids.

static first()[source]

Get the first elements of the list of selected elements.

Returns

The first element in a list of selected elements

Return type

object

static get()[source]

Get the currently selected elements.

Returns

The list of selected elements

Return type

list

static set(ids)[source]

Set the selection to a list of element ids.

Parameters

ids (list) – A list of element ids