Print Logical Name & Physical properties from OR

Following program will return the class name, logical name and all physical properties of a object placed in OR:

Set RepositoryFrom = CreateObject("Mercury.ObjectRepositoryUtil")
RepositoryFrom.Load ""   ' Write your OR path here
Dim TOCollection,Msg
Set TOCollection = RepositoryFrom.GetAllObjects
For i = 0 To TOCollection.Count - 1
               Set TestObject = TOCollection.Item(i)
               ln = RepositoryFrom.GetLogicalName(TestObject)
               cn= TestObject.GetTOProperty("Class Name")
              Set PropertiesCollection = TestObject.GetTOProperties()
              Msg=""
              For n=0 To PropertiesCollection.Count - 1
              Set Property = PropertiesCollection.Item(n)
              Msg = Msg & Property.Name & "-" & Property.Value & vbNewLine
Next
print cn & vbnewline & ln &vbnewline & Msg & VBnewline & VBnewline & VBnewline
Next

Comments

Post a Comment

Popular posts from this blog

Arrays

What is the difference between eval, execute and executeglobal.

Sample Test Strategy for a MicroService Project with APIs only