Dear Sanne,
The
GetDataInfo command is the one you are looking for. Sadly, our documentation is quite out of data, so you won't find it there:(
Here's a code snippet:
Code:GetURL (dataString, "http://www.hyphy.org/phylohandbook/data/Drosophila_adh.nex");
DataSet ds = ReadFromString (dataString);
DataSetFilter filteredData = CreateFilter (ds,1);
GetDataInfo (charInfo, filteredData, "CHARACTERS");
fprintf (stdout, charInfo);
GetDataInfo (paramInfo, filteredData, "PARAMETERS");
fprintf (stdout, paramInfo);
Secondly,
Code:fprintf (stdout,LIST_ALL_VARIABLES);
lists all currently defined variables (alphabetically), along with their internal index (which only tells you something about the order the variables were created in).
If you want to scan all variables, use the
Code:GetInformation(".*",varInfo);
The first parameter can be any regular expression, and the second parameter will hold a matrix with variable ids that match the regular expression.
You can use
Code:ExecuteCommands("varValue = " + someVariableIDString);
to place the value of the variable whose
ID is in someVariableIDString into varValue
HTH,
Sergei