My testcode is nothing but the simplest method of testing each IS function.
Public Sub Test_SphereTorus()
Set oAcadDoc = ThisDrawing
Dim oEllipse As AcadEllipse
Dim oEnt As AcadEntity
Dim oSphere As Acad3DSolid
Dim oPoint As Variant
Set oEnt = oAcadDoc.ModelSpace.AddSphere(MakePoint(0, 0, 0), 5)
Set oSphere = oEnt
MsgBox IsSphereTorus(oSphere)
End Sub
Public Function MakePoint(ByVal X As Double, ByVal Y As Double, ByVal Z As Double)
Dim dCoordinate(0 To 2) As Double
dCoordinate(0) = X
dCoordinate(1) = Y
dCoordinate(2) = Z
MakePoint = dCoordinate
End Function
Long range code will be a conditional loop or on demand call of all ModelSpace Items as encountered or re-encountered. IsLine, IsCircle, IsEllipse, IsEllipseOpen, etc (all 2D objects easily identified) and all that remain are the 3DSolids, IsSphere, IsCube, IsCylinder etc. Polylines and splines the hardest to identify, but not used in our drawings, so irrelevant.
The IS functions are integral to various parts of my total code. Start/end/center points differ between types of entities/objects, OSnap behavior is controlled by the object passed.
For instance, if I want to Automate the OSnap-Center based on other passed geometry, I have to know if said geometry is a circle or sphere, if circle eRetVal is object.center, if Sphere eRetval is object.centroid. Therefore, if object is of type Box or Cylinder, I return something else.
Another instance, if looking for available snap points on an Ellipse, I have IsEllipse and IsEllipseOpen ... eRetval if IsEllipse only have center point and lengths, if IsEllipseOpen, have start/end & center points available.