revitron.view

This submodule provides helpers related to Revit views.

Classes:

ViewSheetList(sheets)

The ViewSheetList class creates a list of custom view objects based on a list of sheets.

class ViewSheetList(sheets)[source]

Bases: object

The ViewSheetList class creates a list of custom view objects based on a list of sheets.

Methods:

__init__(sheets)

Inits an new ViewSheetList object.

get()

Returns the list of view objects.

__init__(sheets)[source]

Inits an new ViewSheetList object.

Parameters

sheets (list) – A list with sheets or sheet ids

get()[source]

Returns the list of view objects. The view objects have the following properties:

  • id: The ID of the view

  • sheet: The sheet object where the view is placed on

  • view: The actual view object

The returned list can be used as follows:

sheets = revitron.Filter().byCategory('Sheets').getElements()
for view in revitron.ViewSheetList(sheets).get():
        print(view.id, view.sheet, view.view)
Returns

A list with view objects as described above

Return type

list