TransmissionDataSetDesiredReferenceData Method |
Sets the ExternalFileReference information which
Revit should use the next time it opens the document
which this TransmissionData belongs to.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic void SetDesiredReferenceData(
ElementId elemId,
ModelPath path,
PathType pathType,
bool shouldLoad
)
Public Sub SetDesiredReferenceData (
elemId As ElementId,
path As ModelPath,
pathType As PathType,
shouldLoad As Boolean
)
public:
void SetDesiredReferenceData(
ElementId^ elemId,
ModelPath^ path,
PathType pathType,
bool shouldLoad
)
member SetDesiredReferenceData :
elemId : ElementId *
path : ModelPath *
pathType : PathType *
shouldLoad : bool -> unit
Parameters
- elemId ElementId
-
The id of the element associated with this reference.
- path ModelPath
-
A ModelPath indicating the location to load the external
file reference from.
- pathType PathType
-
A PathType value indicating what type of path the ModelPath is.
- shouldLoad Boolean
-
True if the external file should be loaded the next time Revit
opens the document. False if it should be unloaded.
ExceptionsException | Condition |
---|
ArgumentException |
elemId does not correspond to an ExternalFileReference
contained in this TransmissionData.
-or-
These inputs will not produce a valid ExternalFileReference.
|
ArgumentNullException |
A non-optional argument was null
|
ArgumentOutOfRangeException |
A value passed for an enumeration argument is not a member of that enumeration
|
Remarks
There must already be a reference associated with
the given id for this function to be valid. New
references cannot be created in a closed file.
See the documentation for a particular reference
type to see its creation API.
See Also