OpenLastViewed Method


Sets the configuration to open all user-created worksets that were last recorded to be open; other worksets are not affected.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2014

Syntax

C#
[ObsoleteAttribute("This method is obsolete in Revit 2015.  Use the constructor to specify the default rule for workset opening instead.")]
public void OpenLastViewed()
Visual Basic
<ObsoleteAttribute("This method is obsolete in Revit 2015.  Use the constructor to specify the default rule for workset opening instead.")> _
Public Sub OpenLastViewed
Visual C++
[ObsoleteAttribute(L"This method is obsolete in Revit 2015.  Use the constructor to specify the default rule for workset opening instead.")]
public:
void OpenLastViewed()

Remarks

Calling this method on a configuration created with WorksetConfigurationOption.CloseAllWorksets will change the configuration to close all worksets except for the last viewed. Otherwise, this has no effect.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →