Generate a list of shared projects per layer

Today I add to compare the projects in an acceptance environment with the projects in the test environment. I did this so that I can make backups of the projects in test that are not in acceptance yet, before I import the acceptance model store.

Here in the simple job I wrote to show an list of shared projects in an infolog. You can change #ProjectSharedPath to see private projects or UtilEntryLevel::var enum so see projects in other layers.

  1. static void listOfSharedProjects(Args _args)
  2. {
  3.     #AOT
  5.     Treenode        shared = TreeNode::findNode(#ProjectSharedPath);
  6.     Treenode        project;
  7.     UtilEntryLevel  utilEntryLevel = UtilEntryLevel::var;
  8.     Str             projectName;
  9.     int             nodeCount;
  10.     int             i;    
  12.     nodeCount   = shared.AOTchildNodeCount();
  13.     project     = shared.AOTfirstChild();
  15.     for (i=1; i<=nodeCount; ++i)
  16.     {
  17.         if (project.AOTLayer() == utilEntryLevel)
  18.         {
  19.             projectName = project.AOTname();        
  20.             info(projectName);
  21.         }
  22.         project = project.AOTnextSibling();
  23.     }
  24. }

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">