09-09-2016 04:25 PM
Is there a way to find out if an entity is alive? (I believe it is the same as asking if an entity was not marked by lose(), but I might be wrong)
My problem is that I try to detolerize tedges of a face using api_replace_tedge_with_edge(). In some cases all calls api_replace_tedge_with_edge() succeed, but more often I have CHANGE_LOST_ENT : "attempt to change record marked as deleted" failure. This perhaps means that after the first edge was detolerized, some other edges are not alive anymore (is it correct interpretation?)
In cases like this it would be helpful to know if an edge is alive, is marked for deletion, etc. How can I achieve this?
Solved! Go to Solution.
09-12-2016 08:53 AM
You are right, actually I'm thinking about it.
But it looks like the entities are not deleted immediately, they are just marked for deletion. In this case must exist a method which can tell to a user that the entity is not alive anymore.
09-12-2016 10:02 AM
The bulletin board can be scanned after an API, unless you use the option 'bb_immediate_close. With 'bb_immediate_close set to TRUE, bulletin boards are processed immediately at the end of an API. otherwise they are processed at the start of the next API. The articles pointed to by https://doc.spatial.com/get_doc_page/articles/h/i/s/History_and_Roll_a088.html explain in detail how the history data structures are set up. Each time an ENTITY is changed, ENTITY::backup should be called. This will create a bulletin recording the change. The bulletins are aggregated into a bulletin board. The global function current_bb allows you to get the current bulletin_board for scanning the history. Scanning the history is going to be O(N) where N is the number of changes so you don't want to do it in other big loops.
hope this helps