When you run this plugin, a message box displays the number of groups.
Imports Microsoft.VisualBasic
Imports Amos
<System.ComponentModel.Composition.Export(GetType(IPlugin))>
Public Class CustomCode
Implements IPlugin
Public Function Mainsub() As Integer Implements IPlugin.Mainsub
MsgBox("Number of groups = " & pd.ngroups)
End Function
Public Function Name() As String Implements IPlugin.Name
End Function
Public Function Description() As String Implements IPlugin.Description
End Function
End Class