Option Infer On
Imports Snap, Snap.Create, Snap.UI
Public Class MyProgram
Public Shared Sub Main()
' Create a selection dialog, and allow selection of multiple arcs
Dim dialog = Selection.SelectObject("Select arcs")
dialog.SetCurveFilter(Snap.NX.ObjectTypes.Type.Arc)
dialog.AllowMultiple = True
' Display the dialog and get a result
Dim result = dialog.Show()
' Cycle through the selected arcs
If result.Response <> Response.Cancel And result.Response <> Response.Back Then
For Each obj In result.Objects
Dim arc As NX.Arc = CType(obj, Snap.NX.Arc) ' Cast to type Arc
Dim center As Position = arc.Center ' Get center
Point(center) ' Create point
Sphere(center, arc.Diameter) ' Create sphere
Next
End If
End Sub
End Class