CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

渲染平滑度属性 (ActiveX)

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

摘要: 指定着色、渲染和隐藏的线条删除对象的平滑度。

指定着色、渲染和隐藏的线条删除对象的平滑度。

支持的平台:仅窗口

签名

工 务 局:

object.RenderSmoothness
对象

类型:数据库首选项

此属性适用的对象。

属性值

只读:

类型:

有效范围为 0.01 到 10.0。

言论

此属性的初始值为 0.5。若要提高性能,请在绘制时将此值设置为 1 或更小。

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

例子

工 务 局:

Sub Example_RenderSmoothness()
    ' This example returns the current setting of
    ' RenderSmoothness. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim currRenderSmoothness As Double
    Dim newRenderSmoothness As Double
    
    ' Retrieve the current RenderSmoothness value
    currRenderSmoothness = ThisDrawing.preferences.RenderSmoothness
    MsgBox "The current value for RenderSmoothness is " & currRenderSmoothness, vbInformation, "RenderSmoothness Example"
    
    ' Change the value for RenderSmoothness
    newRenderSmoothness = 2.5
    ThisDrawing.preferences.RenderSmoothness = newRenderSmoothness
    MsgBox "The new value for RenderSmoothness is " & newRenderSmoothness, vbInformation, "RenderSmoothness Example"
    
    ' Reset RenderSmoothness to its original value
    ThisDrawing.preferences.RenderSmoothness = currRenderSmoothness
    MsgBox "The RenderSmoothness value is reset to " & currRenderSmoothness, vbInformation, "RenderSmoothness Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_RenderSmoothness()
    ;; This example returns the current setting of
    ;; RenderSmoothness. It then changes the value, and finally
    ;; it resets the value back to the original setting.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    (setq preferences (vla-get-Preferences doc))
    
    ;; Retrieve the current RenderSmoothness value
    (setq currRenderSmoothness (vla-get-RenderSmoothness preferences))
    (alert (strcat "The current value for RenderSmoothness is " (rtos currRenderSmoothness 2)))
    
    ;; Change the value for RenderSmoothness
    (setq newRenderSmoothness 2.5)
    (vla-put-RenderSmoothness preferences newRenderSmoothness)
    (alert (strcat "The new value for RenderSmoothness is " (rtos newRenderSmoothness 2)))
    
    ;; Reset RenderSmoothness to its original value
    (vla-put-RenderSmoothness preferences currRenderSmoothness)
    (alert (strcat "The RenderSmoothness value is reset to " (rtos currRenderSmoothness 2)))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 00:00

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部