GetCheckoutStatus Method (Document, ElementId, String)


Gets the ownership status and outputs the owner of an element.

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

Syntax

C#
public static CheckoutStatus GetCheckoutStatus(
	Document document,
	ElementId elementId,
	out string owner
)
Visual Basic
Public Shared Function GetCheckoutStatus ( _
	document As Document, _
	elementId As ElementId, _
	<OutAttribute> ByRef owner As String _
) As CheckoutStatus
Visual C++
public:
static CheckoutStatus GetCheckoutStatus(
	Document^ document, 
	ElementId^ elementId, 
	[OutAttribute] String^% owner
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document containing the element.
elementId
Type: Autodesk.Revit.DB ElementId
The id of the element.
owner
Type: System String %
The owner of the element, or an empty string if no one owns it.

Return Value

An indication of whether the element is unowned, owned by the current user, or owned by another user.

Remarks

This method returns a locally cached value which may not be up to date with the current state of the element in the central. Because of this, the return value is suitable for reporting to an interactive user (e.g. via a mechanism similar to Worksharing display mode), but cannot be considered a reliable indication of whether the element can be immediately edited by the application. Also, the return value may not be dependable in the middle of a local transaction. See the remarks on WorksharingUtils for more details.

For performance reasons, the model is not validated to be workshared, and the element id is also not validated; the element will not be expanded.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also