i want to get all the child objects of a object, and show all the properties for each child object ,but i find there is something wrong with my code, please help me solve the problem:
Set ChildObjects = container.ChildObjects
cnt = ChildObjects.Count
If cnt > 0 Then
strReport = container.ToString() & " contains the following child object(s):"
For i = 0 To cnt - 1
Set Props = ChildObjects.Item(i).GetTOProperties
PropsCount = Props.Count
when i run the script,the msgbox show that the PropsCount is 0,i don't know why
please help , many thinks
You don't have objects in the object repository and it showing GetTOProperties count as 0 which is correct behavior.
Hey Just check your code..I think U r missing 'next' in your For loop.
Well there are some differences in objects derived from OR/DP and childObjects
All objects derived from childObjects seems to have no TOProperties and they have some kind of direct pointer to the actual object. Which means GetTOProperties will not work in such a case. The only possible solution is to use GetROProperty and check the property value