This example demonstrates the VariableName method.
Imports System.Diagnostics
Module MainModule
' VariableName Method Example
Sub Main()
Dim Sem As New AmosEngineLib.AmosEngine
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Grnt_fem")
Sem.AStructure("visperc = (1) spatial + (1) err_v")
Sem.AStructure("cubes = spatial + (1) err_c")
Sem.AStructure("lozenges = spatial + (1) err_l")
Sem.AStructure("paragraph = (1) verbal + (1) err_p")
Sem.AStructure("sentence = verbal + (1) err_s")
Sem.AStructure("wordmean = verbal + (1) err_w")
'List all of the variables in the model
Dim i As Integer
For i = 1 To Sem.NumberOfVariables
Debug.WriteLine(i.ToString.PadLeft(5) & " " & Sem.Variablename(i))
Next
'What is the variable number of "cubes"?
Debug.WriteLine("")
Debug.WriteLine("""cubes"" is variable number " & Sem.VariableNumber("cubes"))
Sem.Dispose()
End Sub
End Module