IUANode.FindNodesByType<T>()
Returns an
IEnumerable
C# list that corresponds to the list of all the child nodes of the node on which the method is invoked and of the specified type.
TIP:
In Visual Studio and Visual Studio Code, specifying the exact type (
<T>
) improves the intelligent code completion and makes it easier to identify errors while writing the code.At runtime, it is evident if the node searched is of the requested type. If the searched node is not of the requested type, the API returns
null
.IEnumerable<T> FindNodesByType<T>();
Arguments
- T
- A IUANode C# class that corresponds to the C# object class to return.
Returns
- IEnumerable
- A C# list that contains the nodes of the requested type.
Example
The following example shows a returned list of all nodes of the
Motor
type in the project:
var motors = Project.Current.FindNodesByType<Motor>();
Provide Feedback