指定 OLE 对象的打印质量。 支持的平台:仅窗口 属性值只读:不 类型:枚举acOleQuality
言论此属性的初始值为。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)) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:42
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.