CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

OLEQuality Property (ActiveX)

2023-1-3 09:37| 发布者: admin| 查看: 375| 评论: 0|来自: AutoCAD

摘要: 指定 OLE 对象的打印质量。

指定 OLE 对象的打印质量。

支持的平台:仅窗口

签名

工 务 局:

object.OLEQuality
对象

类型:首选项输出

此属性适用的对象。

属性值

只读:

类型:枚举acOleQuality

  • acOQLineArt
  • acOQText
  • acOQGraphics
  • acOQPhoto
  • acOQHighPhoto

言论

此属性的初始值为。acOQText

注意:此属性的值存储在 OLEQUALITY 系统变量中。

例子

工 务 局:

Sub Example_OLEQuality()
    ' This example reads and modifies the preference value that controls
    ' the plot quality of OLE objects. When finished, this example resets
    ' the preference value back to its original value.
    
    Dim ACADPref As AcadPreferencesOutput
    Dim originalValue As Variant, DisplayValue As String
    
    ' Get the output preferences object
    Set ACADPref = ThisDrawing.Application.preferences.Output
    
    ' Store original value
    originalValue = ACADPref.OLEQuality
    
    ' Read and display the original value
    GoSub GETVALUE
    MsgBox "The OLEQuality preference is currently set to: " & DisplayValue

    ' Modify the OLEQuality preference by changing it to High Quality Photographic
    ACADPref.OLEQuality = acOQHighPhoto
    GoSub GETVALUE
    MsgBox "The OLEQuality preference has been set to: " & DisplayValue

    ' Reset the preference back to its original value
    '
    ' * Note: Comment out this last section to leave the change to
    '         this preference in effect
    ACADPref.OLEQuality = originalValue
    GoSub GETVALUE
    MsgBox "The OLEQuality preference was reset back to: " & DisplayValue

    Exit Sub
    
GETVALUE:
    ' Convert the value of this setting to a meaningful text string
    DisplayValue = ACADPref.OLEQuality
    Select Case DisplayValue
        Case acOQLineArt: DisplayValue = "Line Art"
        Case acOQText: DisplayValue = "Text"
        Case acOQGraphics: DisplayValue = "Graphics"
        Case acOQPhoto: DisplayValue = "Photo"
        Case acOQHighPhoto: DisplayValue = "High Photo"
    End Select
    
    Return

End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_OLEQuality()
    ;; This example reads and modifies the preference value that controls
    ;; the plot quality of OLE objects. When finished, this example resets
    ;; the preference value back to its original value.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; Store original value
    (setq originalValue (vla-get-OLEQuality (vla-get-Output preferences)))
    
    ;; Read and display the original value
    (setq DisplayValue (cond
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQLineArt) "Line Art")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQText) "Text")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQGraphics) "Graphics")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQPhoto) "Photo")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQHighPhoto) "High Photo")
                       ))
    (alert (strcat "The OLEQuality preference is currently set to: " DisplayValue))

    ;; Modify the OLEQuality preference by changing it to High Quality Photographic
    (vla-put-OLEQuality (vla-get-Output preferences) acOQHighPhoto)
    (setq DisplayValue (cond
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQLineArt) "Line Art")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQText) "Text")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQGraphics) "Graphics")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQPhoto) "Photo")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQHighPhoto) "High Photo")
                       ))
    (alert (strcat "The OLEQuality preference has been set to: " DisplayValue))

    ;; Reset the preference back to its original value
    ;;
    ;; * Note: Comment out this last section to leave the change to
    ;;         this preference in effect
    (vla-put-OLEQuality (vla-get-Output preferences) originalValue)
    (setq DisplayValue (cond
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQLineArt) "Line Art")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQText) "Text")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQGraphics) "Graphics")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQPhoto) "Photo")
                           ((= (vla-get-OLEQuality (vla-get-Output preferences)) acOQHighPhoto) "High Photo")
                       ))
    (alert (strcat "The OLEQuality preference was reset back to: " DisplayValue))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 06:21

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部