How to call a folder in DNG for API script appending name
// Change Names to include abbreviations
changeName = function(ref){
//API Call to get attributes from the artifact
RM.Data.getAttributes(ref, [RM.Data.Attributes.NAME, RM.Data.Attributes.ARTIFACT_TYPE, RM.Data.Attributes.IDENTIFIER, 'Level', 'System'], function(result){
var artType, artID, artName, artName2;
var level, system;
if(result.code != RM.OperationResult.OPERATION_OK){
console.log("error: ", result);
}
else{
console.log("worked");
// Build up data to save here
var toSave = [];
// For each artifact save the attributes that we will need to use or append
result.data.forEach(function(item){
for(var prop in item.values){
if (prop == RM.Data.Attributes.NAME){
artName = item.values[prop];
}
if (prop == RM.Data.Attributes.ARTIFACT_TYPE){
artType = item.values[prop];
}
if (prop == RM.Data.Attributes.IDENTIFIER){
artID = item.values[prop];
}
if (prop == 'Level'){
level = item.values[prop];
}
if (prop == 'System'){
system = item.values[prop];
}
}
Comments
Donald Nong
Feb 10 '16, 7:41 p.m.I checked the RM Extension API specification and could see no "folder" at all. And "parent" does not appear as an attribute either. I guess you're out of luck here.