ViewDisplayBackground.CreateImage Method

ViewDisplayBackgroundCreateImage Method

Creates an object that can be passed to View.SetBackground method to set the background of the Image type.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static ViewDisplayBackground CreateImage(
	string imagePath,
	ViewDisplayBackgroundImageFlags flags,
	UV imageOffsets,
	UV imageScales
)
Public Shared Function CreateImage ( 
	imagePath As String,
	flags As ViewDisplayBackgroundImageFlags,
	imageOffsets As UV,
	imageScales As UV
) As ViewDisplayBackground
public:
static ViewDisplayBackground^ CreateImage(
	String^ imagePath, 
	ViewDisplayBackgroundImageFlags flags, 
	UV^ imageOffsets, 
	UV^ imageScales
)
static member CreateImage : 
        imagePath : string * 
        flags : ViewDisplayBackgroundImageFlags * 
        imageOffsets : UV * 
        imageScales : UV -> ViewDisplayBackground 

Parameters

imagePath  String
File path with the image to be used.
flags  ViewDisplayBackgroundImageFlags
Combination of flags (binary) that control how image is displayed in relation to the view/crop boundary.
imageOffsets  UV
Horizontal (u) and vertical (v) offsets of the image.
imageScales  UV
Horizontal (u) and vertical (v) scales of the image (1 == no change).

Return Value

ViewDisplayBackground
New background object to pass to View.SetBackground.
Exceptions
ExceptionCondition
ArgumentException The file specified by imagePath is not an image file. A valid image file should be in one of the following formats: bmp, jpg, jpeg, png, tif.
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
FileArgumentNotFoundException The file specified by imagePath doesn't exist.
See Also