Adds a sphere given the center point and radius. The sphere object is created as a polygon mesh.
Syntax
objectVariable = object.AddSphere(Center, Radius)
Where:
Center is a Point object representing the center of the sphere;
Radius is a double-precision variable or number representing the radius of the sphere.
AddSphere method example
Private Sub AddSphereExample()
'This example adds a sphere to the drawing.
' It then zooms to the extents of the drawing.
Dim myDoc As CADopia.Document
Dim sphereObj As CADopia.PolygonMesh
Dim pt As Point
Set myDoc = ActiveDocument
Set pt = Library.CreatePoint(4, 4, 0)
Set sphereObj = ThisDocument.ModelSpace.AddSphere(pt, 5)
sphereObj.Update
ThisDocument.ActiveViewport.ZoomExtents
End Sub
Comments