Lathe tooltable variables

I am trying to read the tool type for a m31 macro to probe for tool X and Z offset.
I have this snippet of code trying to read the tool type field as I do on my mill but it must be different.
/// M200 - Debug Tool Type Macro
/// Displays current tool number and its Type field value from tool table.
/// </summary>
int toolNum = exec.Getcurrenttool();
if (toolNum < 1 || toolNum > 96) {
exec.AddStatusmessage("M200: Invalid or no tool selected.");
return;
}
string toolType = exec.Readkey("Tooltablevalues", "Type" + toolNum, "");
exec.AddStatusmessage("M200: Tool T" + toolNum + " Type = '" + toolType + "'");
var typeFlags = toolType.Split(new char[] { ' ', ',', ';' }, StringSplitOptions.RemoveEmptyEntries);
exec.AddStatusmessage("M200: Parsed flags: [" + string.Join(", ", typeFlags) + "]");
I have this snippet of code trying to read the tool type field as I do on my mill but it must be different.
/// M200 - Debug Tool Type Macro
/// Displays current tool number and its Type field value from tool table.
/// </summary>
int toolNum = exec.Getcurrenttool();
if (toolNum < 1 || toolNum > 96) {
exec.AddStatusmessage("M200: Invalid or no tool selected.");
return;
}
string toolType = exec.Readkey("Tooltablevalues", "Type" + toolNum, "");
exec.AddStatusmessage("M200: Tool T" + toolNum + " Type = '" + toolType + "'");
var typeFlags = toolType.Split(new char[] { ' ', ',', ';' }, StringSplitOptions.RemoveEmptyEntries);
exec.AddStatusmessage("M200: Parsed flags: [" + string.Join(", ", typeFlags) + "]");