This article applies to:
This item was introduced in E-Prime 2.0 (184.108.40.206).
E-Prime has the Procedure.ChildObjectCount, Procedure.GetChildObjectName, Procedure.GetChildObjectTypeName methods.
ChildObjectCount returns an integer that represents how many child objects are in the Procedure (e.g., 5 objects in the Procedure, 5 is returned). Therefore, it includes InLine objects and any duplicate items.
GetChildObjectName returns the name of each child object specified by index (e.g., "Stimulus is returned if a Slide named "Stimulus" exists). This function cannot be used if Procedure.ChildObjectCount is zero.
GetChildObjectTypeName returns the string name of the type of child object specified by index (e.g., "Slide" is returned if a Slide named "Stimulus" exists). This function cannot be used if Procedure.ChildObjectCount is zero.
The script below can be used in any experiment where a Procedure named "TrialProc" exists. The script determines the object name, type, and then provides the count.
'This script is used to find the name and type
'of every object in a Procedure named TrialProc.
Dim i As Integer
For i = 1 To TrialProc.ChildObjectCount
Debug.Print "Name and type: " & TrialProc.GetChildObjectName (i) & ebTab & TrialProc.GetChildObjectTypeName (i)
Debug.Print "Count: " & TrialProc.ChildObjectCount
For more information view the E-Prime Command Reference for specifics involving E-Basic (https://pstnet.com/ecr).