Dear All,
I have a requirement where I need to change the naming conventions of objects and elements of objects.
static void EDRenaming(Args _args)
{
UtilIdElements utilId;
str s;
TreeNode TreeNode;
TreeNode node;
str oldName;
str newName;
#Properties
#AOT
;
while select utilId where utilid.recordType == UtilElementType::Enum
&& utilId.name like 'XXX*'
{
s = utilId.name;
node = TreeNode::findNode(#BaseEnumsPath + "\\" + s);
oldName = node.AOTgetProperty("Name");
newName = strdel(oldName,1,3);
node.AOTsetProperty(#PropertyName, "YYY"+newName);
node.AOTsave();
node.treeNodeRelease();
node = null;
}
}
Here I got the logic to change the name of enum from XXXEnum to YYYEnum, but I didnt get the logic to change the element name i.e., XXXElement1 to YYYElement1..
Can anyone please help me out...