| Revit 2017 API |
| ImageType..::..ReloadFrom Method |
| ImageType Class See Also |
Reloads the image from new image file.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)
Since:
2015
Syntax
| C# |
|---|
public void ReloadFrom( string imagePath ) |
| Visual Basic |
|---|
Public Sub ReloadFrom ( _ imagePath As String _ ) |
| Visual C++ |
|---|
public: void ReloadFrom( String^ imagePath ) |
Parameters
- imagePath
- Type: System..::..String
A new path to an image file to load.
Remarks
If reload fails (because the image file doesn't exist or cannot be read),
the currently loaded image will remain unchanged.
Please note that only images with non-empty path could be reloaded.
Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentException | imagePath is an empty string. -or- The given imagePath is not a valid image file to load. |
| Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
| Autodesk.Revit.Exceptions..::..FileArgumentNotFoundException | The given imagePath does not exist. |
| Autodesk.Revit.Exceptions..::..InvalidOperationException | This image is not loaded from a file. |
| Autodesk.Revit.Exceptions..::..ModificationForbiddenException | The document containing this ImageType is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document containing this ImageType is being loaded, or is in the midst of another sensitive process. |
| Autodesk.Revit.Exceptions..::..ModificationOutsideTransactionException | The document containing this ImageType has no open transaction. |