2020 Method
Changes 0
M

ExternalResourceReference.CreateLocalResource

Description:
Creates an ExternalResourceReference representing a local file managed by Revit's built-in server.
public static ExternalResourceReference CreateLocalResource(
	Document doc,
	ExternalResourceType resourceType,
	ModelPath path,
	PathType pathType
)
  • doc
    The document containing the reference. If the PathType is relative, the path will be made relative to the location of this Document. (If this Document belongs to a workshared model, the reference will be relative to the central model.)
  • resourceType
    The type of the external resource.
  • path
    A path to the external file. This path must be absolute. If the PathType is relative, then Revit will relativize the path according to the location of the given Document.
  • pathType
    An enum indicating the type of path which the ExternalResourceReference should use. The PathType must be PathType.Server if the reference is to a Revit model on Revit Server. The PathType must be PathType.Absolute if the reference is local but the host model or host's central model are on Revit Server.
Return Value ExternalResourceReference The newly-created ExternalResourceReference.