Iterate through AOT tree

I came across this piece of code which was required to check the AOT elements for certain things.
This iteration should work fine as long as all the developments done show up in your session.
The best way is to restart the AOS and run it to make sure the utilElements have all new objects

UtilElements e;
UtilEntryLevel utilLevel = global::currentAOLayer();
TreeNode treeNode;
while select e
where e.utilLevel == utilLevel
&& !(e.recordType == 37 //SharedProjects
|| e.recordType == 78) //WebListDef
//treeNode = xUtilElements::getNodeInTree(e);
treeNode = xUtilElements::getNodeInTree(xUtilElements::parentElement(e));


2 thoughts on “Iterate through AOT tree

  1. Have you found that some customisations don’t appear in the correct layer when traversing UtilElements? Some of my customisations are “acknowledged” and some refuse to appear in anything other than SYS/SYP.


  2. You may need to restart the AOS server, and while you are about to start, delete the axapd.aoi file so that the index is re-created.
    The elements may not have got to the aoi file for the elementutil to search on.


Leave a Reply / Comment

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s