Get Layer - typename with AM
Hi,
is there a way to get the layer typename via the AM?
Here's the code as far as I already have it. All I need is the typename.
getMinInfoByIdx = function (idx) {
try {
var ref = new ActionReference();
//Ebene anhand des Indexes auswählen
ref.putIndex(cTID('Lyr '), idx);
var desc = executeActionGet(ref);
//Abrufen um was es sich bei der Ebene handelt ("layerSectionStart" ist eine Gruppe)
var layerSection = typeIDToStringID(desc.getEnumerationValue(sTID('layerSection')));
//Alle Informationen zusammenfassen
var info = {
name: desc.getString(cTID('Nm ')),
visible: desc.getBoolean(cTID("Vsbl")),
id: desc.getInteger(sTID("layerID")),
layerSection: layerSection,
};
return info;
}
catch (e) {
alert(e + "\n" + e.line);
}
};
Thanks in advance for the help
Joe
