# Entities observer

**URL:** <https://forums.sketchup.com/t/entities-observer/239>\
**Category:** Ruby API\
**Created:** [August 19, 2014, 5:48am UTC](https://forums.sketchup.com/t/entities-observer/239 "2014-08-19T05:48:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guy](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/guy/32/88_2.png) [@Guy](https://forums.sketchup.com/u/Guy)\
**Post date:** [August 19, 2014, 5:48am UTC](https://forums.sketchup.com/t/entities-observer/239/1 "2014-08-19T05:48:20Z")

</div>

Ok I can put an entity observer on every element but why can’t the EntitiesObserver.onElementRemoved give me the element itself instead of the entityID? It’s not that this entity doesn’t exist anymore for sketchup because sketchup knows it’s a deleted element. Or is there an easy way to know the original entity pointer from the EntityID? The only way I know is to keep track of all entities with an hash entity, entityID.

---

<div class="post-metadata">

**Author:** ![tt\_su](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tt_su/32/17_2.png) [@tt\_su](https://forums.sketchup.com/u/tt_su)\
**Post date:** [August 19, 2014, 8:31am UTC](https://forums.sketchup.com/t/entities-observer/239/2 "2014-08-19T08:31:53Z")

</div>

The object was partially dead already. Returning the entity could lead to crashes I believe. I’m not 100% sure about the details, but there where issues which mean you couldn’t really do much to the entity. Which is not surprisingly as the current observer system just taps directly into the internal notifications and they are not sent with an API in mind.

---

<div class="post-metadata">

**Author:** ![Guy](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/guy/32/88_2.png) [@Guy](https://forums.sketchup.com/u/Guy)\
**Post date:** [August 19, 2014, 8:45am UTC](https://forums.sketchup.com/t/entities-observer/239/3 "2014-08-19T08:45:56Z")

</div>

But returning the pointer gives the opportunity to clean up your own code. It’s not the intension to do something with the element itself.

---

<div class="post-metadata">

**Author:** ![tt\_su](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tt_su/32/17_2.png) [@tt\_su](https://forums.sketchup.com/u/tt_su)\
**Post date:** [August 19, 2014, 9:26am UTC](https://forums.sketchup.com/t/entities-observer/239/4 "2014-08-19T09:26:09Z")

</div>

Trouble was that some people did. There is much in the current observer system that isn’t ideal.  
We are in need of a new one.

---

<div class="post-metadata">

**Author:** ![Guy](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/guy/32/88_2.png) [@Guy](https://forums.sketchup.com/u/Guy)\
**Post date:** [August 19, 2014, 11:41am UTC](https://forums.sketchup.com/t/entities-observer/239/5 "2014-08-19T11:41:41Z")

</div>

What is the status of observers 2.0?
