2020 Method
Changes 4
M

UIApplication.OpenAndActivateDocument

Description:
Opens and activates a Revit document, include both local document or cloud document.
Remarks:
This method, if successful, changes the active document. It is not allowed to have an open transaction in the active document when calling this method. Additionally, this method may not be called from inside an event handler.
public UIDocument OpenAndActivateDocument(
	string fileName
)
  • fileName
    A full path to a revit file to be opened. The file can be either a Revit project, template, or family document.
Return Value The opened document. The opened document.