ImageTypeOptions Class

Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBImageTypeOptions

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class ImageTypeOptions : IDisposable

The ImageTypeOptions type exposes the following members.

Constructors
 NameDescription
Public methodImageTypeOptions(ExternalResourceReference, ImageTypeSource) Constructs a new instance of the ImageTypeOptions object.
Public methodImageTypeOptions(String, Boolean, ImageTypeSource)

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.

This constructor saves an additional setting that indicates whether the imagetype will be a link or an import.

Top
Properties
 NameDescription
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyPageNumber The page in the file to be used for the image
Public propertyPath The path of the file that specifies the image to be used.
Public propertyResolution The Resolution of the image is expressed in dots-per-inch and hence determines the size of a pixel in the image.
Public propertySourceType Indicates whether the image type is a link or an import.
Top
Methods
 NameDescription
Public methodDisposeReleases all resources used by the ImageTypeOptions
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 methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIsValid If true the ImageTypeOptions can be used to create or reload an ImageType.
Public methodSetExternalResourceReference Update the external resource reference to an image.
Public methodSetPath(String)

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.

Public methodSetPath(String, Boolean)

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.

Additionally, indicate whether the path used by ImageType should be absolute or relative.

Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks

ImageTypeOptions are used to describe how an ImageType should be created from an image file.

ImageTypeOptions are used to specify the location of the image file to use for the image using either a string path or an ExternalResourceReference.

ImageTypeOptions are used to specify if the file path should be stored as an absolute path, or a relative path. A relative path is relative to the location of the project file, unless the file is workshared, in which case the relative path is relative to the location of the central file. Note that the relative path option is only available if the project file has been saved.

ImageTypeOptions are used to specify whether the image should be imported or linked. For imported images the image data is added to the Revit project file. For linked images the image data is reloaded everytime the project file is opened. Linked images are only available if they were reloaded successfully, while imported images are always available.

For PDF files the ImageTypeOptions can be used to specify which page in the PDF file to use for the image. For raster based image files the page number must be 1 (the default).

ImageTypeOptions can be used to specify the resolution (in pixels per inch) to use for the image. For PDF files the resolution is used to determine how many pixels to use when rasterizing the PDF page. Using a higher resolution will increase the number of pixels. This will add more detail, but it will also make rendering the image slower. In addition, it will likely increase the amount of data stored in the project when the image is imported.

Raster based images have a fixed number of pixels. As a result, the resolution has no effect on the amount of detail or the amount of data that is stored. The resolution is only used to determine the size of image. Doubling the resolution will make the image appear half the size.

When a file is accessed with the help of an external server, it is likely that a local cache of the file will be created 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.

See Also