Controls the display of raster images during real-time pan and zooms.
Supported platforms: Windows only
VBA:
object.ShowRasterImage
Type: PreferencesDisplay
The object this property applies to.
Read-only: No
Type: Boolean
The initial value for this property is False.
If dragging display is turned on, and you enable ShowRasterImage, a copy of the image moves with the cursor as you reposition the original image.
VBA:
Sub Example_ShowRasterImage() ' This example returns the current setting of ' ShowRasterImage. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currShowRasterImage As Boolean Set preferences = ThisDrawing.Application.Preferences ' Retrieve the current ShowRasterImage value currShowRasterImage = preferences.DISPLAY.ShowRasterImage MsgBox "The current value for ShowRasterImage is " & preferences.DISPLAY.ShowRasterImage, vbInformation, "ShowRasterImage Example" ' Change the value for ShowRasterImage preferences.DISPLAY.ShowRasterImage = Not (currShowRasterImage) MsgBox "The new value for ShowRasterImage is " & preferences.DISPLAY.ShowRasterImage, vbInformation, "ShowRasterImage Example" ' Reset ShowRasterImage to its original value preferences.DISPLAY.ShowRasterImage = currShowRasterImage MsgBox "The ShowRasterImage value is reset to " & preferences.DISPLAY.ShowRasterImage, vbInformation, "ShowRasterImage Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_ShowRasterImage() ;; This example returns the current setting of ;; ShowRasterImage. It then changes the value, and finally ;; it resets the value back to the original setting. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Retrieve the current ShowRasterImage value (setq currShowRasterImage (vla-get-ShowRasterImage (vla-get-Display preferences))) (alert (strcat "The current value for ShowRasterImage is " (if (= currShowRasterImage :vlax-true) "True" "False"))) ;; Change the value for ShowRasterImage (vla-put-ShowRasterImage (vla-get-Display preferences) (if (= currShowRasterImage :vlax-true) :vlax-false :vlax-true)) (alert (strcat "The new value for ShowRasterImage is " (if (= (vla-get-ShowRasterImage (vla-get-Display preferences)) :vlax-true) "True" "False"))) ;; Reset ShowRasterImage to its original value (vla-put-ShowRasterImage (vla-get-Display preferences) currShowRasterImage) (alert (strcat "The ShowRasterImage value is reset to " (if (= (vla-get-ShowRasterImage (vla-get-Display preferences)) :vlax-true) "True" "False"))) )