Extract Method


Returns an instance of BasicFileInfo filled with basic information about a Revit file located at the given file-path

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2013

Syntax

C#
public static BasicFileInfo Extract(
	string file
)
Visual Basic
Public Shared Function Extract ( _
	file As String _
) As BasicFileInfo
Visual C++
public:
static BasicFileInfo^ Extract(
	String^ file
)

Parameters

file
Type: SystemString
The full path to the file to be queried, including project (.rvt) and family (.rfa) files.

Return Value

If successful, basic file data.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsFileArgumentNotFoundException The file doesn't exist.
Autodesk.Revit.ExceptionsInvalidOperationException The file is a newer format file where the structure of the BasicFileInfo storage has changed, or the file is saved in very old version of Revit without basic file data.

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 →