Area / Radius properties example
Sub Area_Example()
Dim cenPt(0 To 2) As Double: cenPt(0) = 4: cenPt(1) = 2: cenPt(2) = 0
Dim dRadius As Double: dRadius = 2.5
Dim myCircle As AcadCircle
Set myCircle = ThisDrawing.ModelSpace.AddCircle(cenPt, dRadius)
Dim dArea As Double
dArea = myCircle.Area
dRadius = myCircle.radius
MsgBox "Area = " & dArea & Chr(13) & "dRadius = " & dRadius
myCircle.radius = 5#
myCircle.Update
MsgBox "Area = " & myCircle.Area & _
Chr(13) & "Radius = " & myCircle.radius & _
Chr(13) & "Diameter = " & myCircle.Diameter
End Sub
© Bricsys NV. All rights reserved. |