Hi Rene,
Unfortunately, the only “button” hooked up from the bottom section of the Materials Catalog is the Save Catalog As. No other buttons including the transmission section is hooked up.
Luckily, the AGF file is a text-based file so you can write a simple parser to open the AGF file, loop through until you find the NM line which matches your desired glass, then continue to read lines until you get to the IT line; once you get to the next NM line, you have finished parsing all the data for the desired glass.
Below is C# pseudo code from a similar task I had to accomplish:
string orgagf = Path.Combine(TheApplication.GlassDir, @"SCHOTT.AGF")
string desiredGlass = "N-BK7";
using (StreamReader file = new StreamReader(orgagf))
{
string ln;
string[] parts;
bool foundGlass = false;
// data to save
List<double[]> transmissionData = new List<double[]>();
while ((ln = file.ReadLine()) != null)
{
ln = ln.Trim();
parts = ln.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length > 1 && parts[0].ToUpper() == "NM")
{
// we have already found the desired glass and now we have hit the next glass in the catalog
if (!foundGlass)
{ break;}
// we found the desired glass...now we can extract the data
if (parts[1].ToUpper() == desiredGlass)
{ foundGlass = true;}
}
if (foundGlass)
{
// let's get the transmission data
if (parts.Length > 3 && parts[0].ToUpper() == "IT")
{
transmissionData.Add(new double[] { Convert.ToDouble(parts[1]), Convert.ToDouble(parts[2]), Convert.ToDouble(parts[3]) });
}
}
}
}