Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reactor App to track the quantity of objects created.

3 REPLIES 3
Reply
Message 1 of 4
MyCADDie
271 Views, 3 Replies

Reactor App to track the quantity of objects created.

I have an app that is almost complete... however, I've think I might have ran into an issue and wonder how I might get around it.

 

On drawing load... Pertinent to this issue, In psuedo code I do the following:

 

  1. Load the reactors.
  2. Set up a couple of global variables to hold the data.
  3. Set a variable EnLast equal to the last entity added to the database.

In a save completed reactor all the new objects created since the EnLast are collected and totals are modified accordingly.

 

This seems to work quite well... however, if the user happens to delete the EnLast, then I have a hunch my reactor will pop an error.

I can of course check if the EnLast has been deleted via vlax-erased-p... but i am wondering then, how I might still get the new objects a.

 

any ideas?

 

3 REPLIES 3
Message 2 of 4
scot-65
in reply to: MyCADDie

AFAIK entity names numerically increase.
<Entity name: 7ffffb05d80>
<Entity name: 7ffffb05d90>
???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 3 of 4
owenwengerd
in reply to: MyCADDie


@MyCADDie wrote:

.. if the user happens to delete the EnLast, then I have a hunch my reactor will pop an error. 


Don't you think it would be prudent to test your hunch instead of making assumptions?

--
Owen Wengerd
ManuSoft
Message 4 of 4
owenwengerd
in reply to: scot-65


@scot-65 wrote:
AFAIK entity names numerically increase.
<Entity name: 7ffffb05d80>
<Entity name: 7ffffb05d90>
???

Handles increase. Entity names are just memory addresses and can just as well decrease.

--
Owen Wengerd
ManuSoft

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost