BasicFileInfo
Encapsulates basic information about a Revit file, including worksharing status, Revit version, username and central path.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.BasicFileInfo
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class BasicFileInfo : IDisposableThe BasicFileInfo type exposes the following members.
Properties
Name
Description
Public Property
AllLocalChangesSavedToCentral
Are all local changes saved to the central file?
Public Property
CentralPath
Returns the central model path.
Public Property
Format
The file format indicator (currently, the major release version such as “2019”) used for saving the file.
Public Property
IsCentral
Checks if the file is workshared and Central.
Public Property
IsCreatedLocal
Checks if the file is local and created by RevitServerTool.exe.
Public Property
IsInProgress
Checks if the file is workshared and is in process of becoming Central.
Public Property
IsLocal
Checks if the file is workshared and Local.
Public Property
IsSavedInCurrentVersion
Checks if the file is saved in the current version.
Public Property
IsSavedInLaterVersion
Checks if the file is saved in a later version of Revit than the running Revit.
Public Property
IsValidObject
Specifies whether the .NET object represents a valid Revit entity.
Public Property
IsWorkshared
Checks if the file is workshared.
Public Property
LanguageWhenSaved
Return the language active for the last save
Public Property
LatestCentralEpisodeGUID
This is the central model’s episode GUID corresponding to the last reload latest done for this model.
Public Property
LatestCentralVersion
This is the central model’s version number corresponding to the last reload latest done for this model.
Public Property
Username
Returns the username.
Methods
Name
Description
Public Method
Dispose
Releases all resources used by the BasicFileInfo
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public Method
Static Member
Extract
Returns an instance of BasicFileInfo filled with basic information about a Revit file located at the given file-path
Public Method
GetDocumentVersion
Gets the DocumentVersion for the file.
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)
Remarks
This class provides a fast access to get basic information without fully opening a Revit file. The
Extract
method can initialize a new instance of this class by providing a full path for Revit file, including project (.rvt) and family (.rfa) files. This class can extract information from files of older formats. If the structure of the BasicFileInfo storage has not changed, it can also extract information from files of newer formats (making the method IsSavedInLaterVersion relevant). However, if the structure of the storage has changed in a newer file format,Extract
will not be able to extract the information.