CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

代理图像属性 (ActiveX)

2023-1-3 07:47| 发布者: admin| 查看: 380| 评论: 0|来自: AutoCAD

摘要: 控制在第三方应用程序中创建的图形中对象的显示。

控制在第三方应用程序中创建的图形中对象的显示。

支持的平台:仅窗口

签名

工 务 局:

object.ProxyImage
对象

类型:首选项打开保存

此属性适用的对象。

属性值

只读:

类型:枚举acProxyImage

  • acProxyNotShow
  • acProxyShow
  • acProxyBoundingBox

言论

此属性的初始值为。acProxyShow

例子

工 务 局:

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))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-11 18:43

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部