This example demonstrates the DataFileNVariables method.
Imports System.Diagnostics
Module MainModule
' DataFileNVariables Method Example
Sub Main()
Dim Sem As New AmosEngineLib.AmosEngine
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Fels_fem")
Sem.GroupName("girls")
Debug.WriteLine(Sem.DataFileNVariables & " variables in the girls' group")
Sem.AStructure("academic = GPA + attract + e1 (1)")
Sem.AStructure("attract = height + weight + rating + academic + e2 (1)")
Sem.AStructure("e2 <--> e1")
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Fels_mal")
Sem.GroupName("boys")
Debug.WriteLine(Sem.DataFileNVariables & " variables in the boys' group")
Sem.AStructure("academic = GPA + attract + e1 (1)")
Sem.AStructure("attract = height + weight + rating + academic + e2 (1)")
Sem.AStructure("e2 <--> e1")
'Once again:
Debug.WriteLine(Sem.DataFileNVariables(1) & " variables in the girls' group")
Debug.WriteLine(Sem.DataFileNVariables(2) & " variables in the boys' group")
Sem.Dispose()
End Sub
End Module