ImageTypeOptions
Represents the options used in ImageType::Create(Document, ImageTypeOptions) and ImageType.ReloadFrom(ImageTypeOptions) methods.
ImageTypeOptions determines how an image file is accessed for the purposes of validation and creation of an ImageType. ImageTypeOptions can be set up to refer to a particular file using either a string path or an external resource reference.
When a file is accessed with the help of an external server, it is likely that the server will cache the file temporarily. ImageTypeOptions may refer to the cached copy of the file internally. For this reason, ImageTypeOptions should be treated as a transient object whose purpose is to become an argument to ImageType.Create(Document, ImageTypeOptions) or ImageType.ReloadFrom(ImageTypeOptions). An application should not create an ImageTypeOptions object and hold onto it for a long time.
public class ImageTypeOptions : IDisposable
| Name | Return Type | Description |
|---|---|---|
| ImageTypeOptions() | None | Constructs a new instance of the ImageTypeOptions object. |
| ImageTypeOptions(ExternalResourceReference) | None | Constructs a new instance of the ImageTypeOptions object. |
| ImageTypeOptions(String) | None | Constructs a new instance of the ImageTypeOptions object.The provided string path must specify a local file. The path can be absolute or relative to the project's location. ImageType will respectively use an absolute or relative path. |
| ImageTypeOptions(String, Boolean) | None | Constructs a new instance of the ImageTypeOptions object.The provided string path must specify a local file. The path can be absolute or relative to the project's location. |
| Name | Return Type | Description |
|---|---|---|
| Dispose() | None | Releases all resources used by the |
| IsValid(Document) | bool | If true the ImageTypeOptions can be used to create or reload an ImageType. |
| SetExternalResourceReference(ExternalResourceReference) | None | Update the external resource reference to an image. |
| SetPath(String) | None | Update the path of the file that specifies the image to be used.The provided string path must specify a local file. The path can be absolute or relative to the project's location. ImageType will respectively use an absolute or relative path. |
| SetPath(String, Boolean) | None | Update the path of the file that specifies the image to be used.The provided string path must specify a local file. The path can be absolute or relative to the project's location. |
| Name | Return Type | Description |
|---|---|---|
| IsValidObject | bool | Specifies whether the .NET object represents a valid Revit entity. |
| PageNumber | int | The page in the file to be used for the image |
| Path | string | The path of the file that specifies the image to be used. |
| Resolution | double | The Resolution of the image is expressed in dots-per-inch and hence determines the size of a pixel in the image. |