The following plugin opens the file Ex11-ab.amw, renames the group Girls to Female, deletes the group Boys, and saves the result in the file Temp.amw. (If the file Temp.amw already exists in the examples directory, it is overwritten.)
Imports Microsoft.VisualBasic
Imports Amos
Imports Amos.pd
<System.ComponentModel.Composition.Export(GetType(IPlugin))>
Public Class CustomCode
Implements IPlugin
Public Function Mainsub() As Integer Implements IPlugin.Mainsub
If FileOpen(AmosDir & "Examples\English\Ex11-ab") Then
Return 0
End If
GroupSelect("Girls")
ModelFitManageGroupsRename("Female")
GroupSelect("Boys")
ModelFitManageGroupsDelete()
FileSaveAs(AmosDir & "Examples\English\Temp.amw")
End Function
Public Function Name() As String Implements IPlugin.Name
End Function
Public Function Description() As String Implements IPlugin.Description
End Function
End Class