Share

ModelPath Class

A path to a file stored on a disk or on a server.

Inheritance Hierarchy

System.Object
  Autodesk.Revit.DB.ModelPath
    Autodesk.Revit.DB.FilePath
    Autodesk.Revit.DB.ServerPath


Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)

Syntax

C#

public class ModelPath : IDisposable

The ModelPath type exposes the following members.

Properties

 NameDescription
Public propertyCentralServerPath The path to the location of the central Revit server or cloud.
Public propertyCloudPath Whether this path represents a path on an Autodesk server such as BIM360.
Public propertyEmpty Whether this path is empty
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyRegion The region of the BIM 360 Docs or Autodesk Docs account and project which contains this model.
Public propertyServerPath Whether this path is a server path (as opposed to a file path or cloud path)

Methods

 NameDescription
Public methodCompare Compares this ModelPath with another
Public methodDisposeReleases all resources used by the ModelPath
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetModelGUID A GUID identifying the Revit cloud model.
Public methodGetProjectGUID A GUID identifying the BIM 360 Docs or Autodesk Docs project to which the model is associated.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)

Remarks

ModelPaths are paths to another file. They can refer to Revit models, or to any of Revit's external file references (DWG links, for example.) Paths can be relative or absolute, but they must include an extension indicating what kind of file it is. Relative paths are generally relative to the currently opened document. If the current document is workshared, paths will be treated as relative to the central model. To create a ModelPath, use the derived classes FilePath , ServerPath, or use [!:Autodesk::Revit::DB::ModelPathUtils::ConvertCloudGUIDsToCloudPath(System::Guid, System::Guid)] for a cloud model path. The class ModelPathUtils contains utility functions for converting ModelPaths to and from strings.

See Also

Reference

Was this information helpful?