CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

ArcSmoothness Property (ActiveX)

2023-1-3 22:43| 发布者: admin| 查看: 403| 评论: 0|来自: AutoCAD

摘要: 指定圆、圆弧和椭圆的平滑度。

指定圆、圆弧和椭圆的平滑度。

支持的平台:仅窗口

签名

工 务 局:

object.ArcSmoothness
对象

类型:光伏端口视口

此属性适用的对象。

属性值

只读:

类型:整数

从 1 到 20,000 的正整数。

言论

此属性的初始值为 100。

数字越大,生成的对象越平滑,但 AutoCAD 需要更多时间来重新生成它们。可以通过将此属性设置为较低的绘图值并增加渲染值来提高性能。有效范围为 1 到 20,000。

例子

工 务 局:

Sub Example_ArcSmoothness()
    ' This example returns the current setting of
    ' ArcSmoothness. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim currArcSmoothness As Integer
    Dim newArcSmoothness As Integer
        
    ' Retrieve the current ArcSmoothness value
    currArcSmoothness = ThisDrawing.ActiveViewport.ArcSmoothness
    MsgBox "The current value for ArcSmoothness is " & currArcSmoothness, vbInformation, "ArcSmoothness Example"
    
    ' Change the value for ArcSmoothness
    newArcSmoothness = 2001
    ThisDrawing.ActiveViewport.ArcSmoothness = newArcSmoothness
    MsgBox "The new value for ArcSmoothness is " & newArcSmoothness, vbInformation, "ArcSmoothness Example"
    
    ' Reset ArcSmoothness to its original value
    ThisDrawing.ActiveViewport.ArcSmoothness = currArcSmoothness
    MsgBox "The ArcSmoothness value is reset to " & currArcSmoothness, vbInformation, "ArcSmoothness Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_ArcSmoothness()
    ;; This example returns the current setting of
    ;; ArcSmoothness. 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))
  
    ;; Retrieve the current ArcSmoothness value
    (setq currArcSmoothness (vla-get-ArcSmoothness (vla-get-ActiveViewport doc)))
    (alert (strcat "The current value for ArcSmoothness is " (itoa currArcSmoothness)))
    
    ;; Change the value for ArcSmoothness
    (setq newArcSmoothness 2001)
    (vla-put-ArcSmoothness (vla-get-ActiveViewport doc) newArcSmoothness)
    (alert (strcat "The new value for ArcSmoothness is " (itoa newArcSmoothness)))
    
    ;; Reset ArcSmoothness to its original value
    (vla-put-ArcSmoothness (vla-get-ActiveViewport doc) currArcSmoothness)
    (alert (strcat "The ArcSmoothness value is reset to " (itoa currArcSmoothness)))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-11 20:56

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部