Hello,
I m trying to Apply a Template via Macro in Aris.
this is the code :
for(m=1; m<=mod.length; m++){
if (mod[m]!=undefined){
if(mod[m].getType()=="65548"){
Designer.openModel(mod[m], false, false, true);
var op=false;
for(var o=0; o<=Designer.getOpenModels().length;o++){
if(Designer.getOpenModels ( )[o]==mod[m]){op=true;}}
if(op==false){Designer.openModel(mod[m], false, false, true);}
Designer.applyTemplate(mod[m], Designer.getTemplateByGUID ( "cec94fe0-9af8-11ed-7b48-005056c00008"), Designer.getOccs(mod[m]));
Designer.save(mod[m]);
Designer.closeModel(mod[m]);
}
}}
the template of the model gets changed by the code, but not the effect of the template (placing an attribute under the objects).
If i do it manually in architect; the effect takes place.
Thanks
Omar