Find an object (e.g. Entity) by name?

While PERModel.Entities can be used to enumerate the entities in a model (as well as PERModel.Views for views, etc.) it doesn’t seem efficient to have to write a function to find a particular entity (or other object type) by name from such an enumeration. Is there a more efficient “find” function available somewhere?

Hi,

yes. You can use this:


var MyEntity = Model.Entities.GetObjectByName(“T_CUSTOMER”)
Log.Information(MyEntity.Caption);

In the Reference Guide see class List.

Regards,

Vaclav

Great, thanks.