Specifies the smoothness of shaded, rendered, and hidden line-removed objects.
Supported platforms: Windows only
VBA:
object.RenderSmoothness
Type: DatabasePreferences
The object this property applies to.
Read-only: No
Type: Double
The valid range is 0.01 to 10.0.
The initial value for this property is 0.5. To improve performance, set this value to 1 or less when drawing.
VBA:
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)))
)