IEnumerable<IDataModelObject> Tree.Find(String name, Func<IDataModelObject, Boolean> func, String tag, ObjectState state)

Gets a list of all objects with the specified parameters.

Remarks

Note that all parameters of Find are optional. Name: Defaults to "" Func: Defaults to null Tag: Defaults to "" State: Defaults to ObjectState.NoState

Examples

The following command finds all objects with an state of Suppressed. ExtAPI.DataModel.Tree.Find(state=ObjectState.Suppressed)
The following command finds all objects with a name of "Force" and a tag of "Load". ExtAPI.DataModel.Tree.Find(name="Force", tag="Load")
The following command finds all objects with the name "Pressure", the function "defineByVector", the Tag "Test", and a ObjectState of Suppressed. def defineByVector(obj): if (obj.DefineBy == LoadDefineBy.Vector): return True return False ExtAPI.DataModel.Tree.Find(name="Pressure", func=defineByVector, tag="Test", state=ObjectState.Suppressed)

Parameters

  • name
    Type: String
    The object's name.
  • func
    Type: Func<IDataModelObject, Boolean>
    The object's function.
  • tag
    Type: String
    The object's tag.
  • state
    The object's state.

Return Value

Type: IEnumerable<IDataModelObject>