How do we select an Entity (i.e. set an entity as SelectedObjects ) in a Logical Model using a Macro ?

I have a scenario where I need to programatically add an Entity in my current Submodel(Logical) into the SelectedObjects list.
Is there a way we can do it in macro?