2027 Method Back to 2027
M

OpenAndActivateDocument

Version comparison

Per-version detail

Click a version below to see what changed in that release vs your current frame (2027).
Identical to 2027: 2025, 2025.3, 2026
2027 current
UIApplication.OpenAndActivateDocument(ModelPath, OpenOptions, Boolean, IOpenFromCloudCallback)
modelPath ModelPath A path to a Revit file to be opened. The file can be either a Revit project, template, or family document.
openOptions OpenOptions Options for opening the file.
detachAndPrompt Boolean True means if openOptions specifies DoNotDetach, then for workshared models detach from central and query the user whether to preserve or discard worksets. make no sense when opening a cloud document.
openFromCloudCallback IOpenFromCloudCallback Callback function that allow caller to handle cases when conflicts happen during opening a cloud document. Make no sense when opening a non-cloud document.
→ returns UIDocument The opened document.
UIApplication.OpenAndActivateDocument(ModelPath, OpenOptions, Boolean, IOpenFromCloudCallback)
modelPath ModelPath A path to a Revit file to be opened. The file can be either a Revit project, template, or family document.
openOptions OpenOptions Options for opening the file.
detachAndPrompt Boolean True means if openOptions specifies DoNotDetach, then for workshared models detach from central and query the user whether to preserve or discard worksets. make no sense when opening a cloud document.
openFromCloudCallback IOpenFromCloudCallback Callback function that allow caller to handle cases when conflicts happen during opening a cloud document. Make no sense when opening a non-cloud document.
→ returns UIDocument The opened document.
UIApplication.OpenAndActivateDocument(ModelPath, OpenOptions, Boolean, IOpenFromCloudCallback)
modelPath ModelPath A path to a Revit file to be opened. The file can be either a Revit project, template, or family document.
openOptions OpenOptions Options for opening the file.
detachAndPrompt Boolean True means if openOptions specifies DoNotDetach, then for workshared models detach from central and query the user whether to preserve or discard worksets. make no sense when opening a cloud document.
openFromCloudCallback IOpenFromCloudCallback Callback function that allow caller to handle cases when conflicts happen during opening a cloud document. Make no sense when opening a non-cloud document.
→ returns UIDocument The opened document.
UIApplication.OpenAndActivateDocument(ModelPath, OpenOptions, Boolean, IOpenFromCloudCallback)
modelPath ModelPath A path to a Revit file to be opened. The file can be either a Revit project, template, or family document.
openOptions OpenOptions Options for opening the file.
detachAndPrompt Boolean True means if openOptions specifies DoNotDetach, then for workshared models detach from central and query the user whether to preserve or discard worksets. make no sense when opening a cloud document.
openFromCloudCallback IOpenFromCloudCallback Callback function that allow caller to handle cases when conflicts happen during opening a cloud document. Make no sense when opening a non-cloud document.
→ returns UIDocument The opened document.
UIApplication.OpenAndActivateDocument(ModelPath, OpenOptions, Boolean, IOpenFromCloudCallback)
modelPath ModelPath A path to a Revit file to be opened. The file can be either a Revit project, template, or family document.
openOptions OpenOptions Options for opening the file.
detachAndPrompt Boolean True means if openOptions specifies DoNotDetach, then for workshared models detach from central and query the user whether to preserve or discard worksets. make no sense when opening a cloud document.
openFromCloudCallback IOpenFromCloudCallback Callback function that allow caller to handle cases when conflicts happen during opening a cloud document. Make no sense when opening a non-cloud document.
→ returns UIDocument The opened document.