The following plugin displays all model names and the constraints imposed by each model.
Imports System.Diagnostics
Imports Microsoft.VisualBasic
Imports Amos
<System.ComponentModel.Composition.Export(GetType(IPlugin))>
Public Class CustomCode
Implements IPlugin
Public Function Mainsub() As Integer Implements IPlugin.Mainsub
Dim i As Long
Dim NModels As Long
Dim SNames() As String
Dim SConstraints() As String
pd.GetModels(SNames, SConstraints)
NModels = UBound(SNames)
Dim message As String
Debug.WriteLine("Number of models = " & NModels)
For i = 1 To NModels
message &= "Name: " & SNames(i)
message &= vbCrLf
message &= "Constraints: " & SConstraints(i)
message &= vbCrLf & vbCrLf
Next
MsgBox(message)
End Function
Public Function Name() As String Implements IPlugin.Name
End Function
Public Function Description() As String Implements IPlugin.Description
End Function
End Class