ProxyImage プロパティ(ActiveX)

サードパーティのアプリケーションで作成された図面内のオブジェクトの表示をコントロールします。

サポートされているプラットフォーム: Windows のみ

構文と要素

VBA:

object.ProxyImage
object

タイプ: PreferencesOpenSave

このプロパティが適用されるオブジェクト。

プロパティの値

読み込み専用: いいえ

タイプ: acProxyImage 列挙型

注意

このプロパティの初期値は acProxyShow です。

VBA:

Sub Example_ProxyImage()
    ' This example returns the current setting of
    ' ProxyImage. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim preferences As AcadPreferences
    Dim currProxyImage As Integer
    Dim constant As String
    Dim newConstant As String
    
    Set preferences = ThisDrawing.Application.preferences
    
    ' Retrieve the current ProxyImage value
    currProxyImage = preferences.OpenSave.ProxyImage
    constant = Choose(currProxyImage + 1, "acProxyNotShow", "acProxyShow", "acProxyBoundingBox")
    MsgBox "The current value for ProxyImage is " & constant, vbInformation, "ProxyImage Example"
    
    ' Change the value for ProxyImage
    newConstant = "acProxyBoundingBox"
    preferences.OpenSave.ProxyImage = acProxyBoundingBox
    MsgBox "The new value for ProxyImage is " & newConstant, vbInformation, "ProxyImage Example"
    
    ' Reset ProxyImage to its original value
    preferences.OpenSave.ProxyImage = currProxyImage
    MsgBox "The ProxyImage value is reset to " & constant, vbInformation, "ProxyImage Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_ProxyImage()
    ;; This example returns the current setting of
    ;; ProxyImage. 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 ProxyImage value
    (setq currProxyImage (vla-get-ProxyImage (vla-get-OpenSave preferences)))
    (setq constant (cond
                       ((= currProxyImage 0) "acProxyNotShow")
                       ((= currProxyImage 1) "acProxyShow")
                       ((= currProxyImage 2) "acProxyBoundingBox")
                   ))
                       
    (alert (strcat "The current value for ProxyImage is " constant))
    
    ;; Change the value for ProxyImage
    (setq newConstant "acProxyBoundingBox")
    (vla-put-ProxyImage (vla-get-OpenSave preferences) acProxyBoundingBox)
    (alert (strcat "The new value for ProxyImage is " newConstant))
    
    ;; Reset ProxyImage to its original value
    (vla-put-ProxyImage (vla-get-OpenSave preferences) currProxyImage)
    (alert (strcat "The ProxyImage value is reset to " constant))
)