ShowRasterImage 属性 (ActiveX) 
控制实时平移和缩放期间光栅图像的显示。 支持的平台:仅限 Windows 属性值只读:不 类型:布尔 
 言论此属性的初始值为 。False 如果拖动显示处于打开状态,并且您启用了 ,则在重新定位原始图像时,图像的副本将随光标移动。ShowRasterImage 注意:此属性的此值存储在 RTDISPLAY 系统变量中。 
例子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
可视化 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")))
)
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 23:59
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.