How to detect and export instrument metadata like instrument type etc

Hi. I am a novice user of AFL and was searching for this answer for quite some time before turning to experts here…

I would like to export (to text file) as much instrument metadata as possible, but at minimum name and instrument type (stock, future, index, …). How to do that? Which AFL functions return this?

I have manged to do this by now (export only name):

// create folder for exporting static data purposes
fmkdir( "D:\\DataExportStatic\\" );

// open file for writing
// file name depends on currently processed ticker
fh = fopen( "D:\\DataExportStatic\\" + Name() + ".txt", "w" );

// proceed if file handle is correct
if ( fh )
    // write header line
    fputs( "Name\n", fh );

    qs =  Name();        
    fputs( qs + "\n", fh );

    // close file handle
    fclose( fh );

// line required by SCAN option
Buy = 0;

Check out: - Most attributes - Instrument Type


SymbolName = GetFnData("FullName");
SymbolGroup = GroupID(1);

Filter = Status("LastBarInRange");
AddTextColumn(SymbolGroup, "SymbolGroup");
AddTextColumn(SymbolName, "SymbolName");