AnsweredAssumed Answered

Evaluating AF Databases Programatically

Question asked by mgeerling Employee on Sep 7, 2016
Latest reply on Sep 7, 2016 by rdavin

Hey guys,

 

I'm working on an AFSDK app that gather information about specific AF Servers / Databases.  I've got a couple things I want to measure, and I'm just wondering the best way to approach these. 

 

1) The overall depth of the database: particularly I'm interested if the hierarchy goes just a few branches deep.  I don't need to count every individual branch.  My initial thought was that I could programatically generate the XML output and then parse this using something like XMLReader

 

2) Count the number of PI Point data references:  I don't have a great idea on how to approach this one.  Is this information available through "Database Properties"?  I see a stat for "Reference Types" -- is there anything beneath / behind this? 

 

3) The number of elements which are based on templates: Manually, I can go to Library > Element Templates > The template in question > General > Find > Elements.  This then returns a list of all the elements.  I could theoretically get a count of this return and loop through this for every template in my AF DB / Server. 

 

Any guidance on getting these metrics is appreciated it.  Still pretty new with AFSDK so documentation would be great as well. 

 

-Matt

Outcomes