IntelliCAD 11.1 Object Library | |
AddImage Method | |
See Also |
- ImageFile
- The full path and file name of the image.
- InsertionPoint
- A Point object identifying the point at which the image will be inserted.
- ScaleFactor
- A double-precision variable (or value) representing the raster image scale factor. The default image scale factor is 1. The scale factor must be a positive number.
- RotationAngle
- A double-precision variable (or value) representing the rotation angle in radians for the raster image.
PaperSpace Collection : AddImage Method |
Description
Syntax
Visual Basic |
---|
Public Function AddImage( _ ByVal ImageFile As String, _ ByVal InsertionPoint As Point, _ Optional ByVal ScaleFactor As Double = 1, _ Optional ByVal RotationAngle As Double = 0 _ ) As Image |
Parameters
- ImageFile
- The full path and file name of the image.
- InsertionPoint
- A Point object identifying the point at which the image will be inserted.
- ScaleFactor
- A double-precision variable (or value) representing the raster image scale factor. The default image scale factor is 1. The scale factor must be a positive number.
- RotationAngle
- A double-precision variable (or value) representing the rotation angle in radians for the raster image.
Example
'This example adds an image to the drawing and determines its properties.
Dim insPoint As IntelliCAD.Point
Dim scalefactor As Double
Dim rotationAngle As Double
Dim imageName As String
Dim rasterObj As IntelliCAD.Image
' Select the image.
imageName = "C:\Program Files\IntelliCAD\Samples\Dallas.bmp"
Set insPoint = Library.CreatePoint(4, 2, 0)
scalefactor = 1
rotationAngle = 0
' Add the image in model space
Set rasterObj = ThisDocument.ModelSpace.AddImage(imageName, insPoint, scalefactor, rotationAngle)
rasterObj.Update
ThisDocument.Application.ZoomExtents
' Determine properties of the image
MsgBox "The image file is: " & rasterObj.ImageFile
MsgBox "The image height is: " & rasterObj.ImageHeight & Chr(13) & "The image width is: " & rasterObj.ImageWidth
MsgBox "The image visibility is: " & rasterObj.ImageVisibility
End Sub