The following program specifies a two-group model and displays the data file, data table name, grouping variable name and grouping value for each group.
Imports System.Diagnostics
Module MainModule
' GetDataFile Method Example
Sub Main()
Dim Sem As New AmosEngineLib.AmosEngine
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Fels_fem")
Sem.AStructure("academic <> attract")
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Fels_mal")
Sem.AStructure("academic <> attract")
Dim dbformat As PXMLPersist.CDataTable.cDatabaseFormat
Dim FileName As String
Dim TableName As String
Dim GroupingVariable As String
Dim GroupingValue As Object
Dim iGroup As Integer
For iGroup = 1 To 2
Debug.WriteLine("")
Debug.WriteLine("Group: " & Sem.GetGroupName(iGroup))
Sem.GetDataFile(iGroup, dbformat, FileName, TableName, GroupingVariable, GroupingValue)
Debug.WriteLine("File Name = " & FileName)
Debug.WriteLine("Table Name = " & TableName)
Debug.WriteLine("Grouping Variable = " & GroupingVariable)
Debug.WriteLine("Grouping Value = " & CStr(GroupingValue))
Next
Sem.Dispose()
End Sub
End Module