Jump to content

Recommended Posts

Posted

Hi

 

I'm looking for a program that logs each command ran by the user, with timestamp, and the number of objects affected by the command.

 

Each command would be a line in the log.

 

Optionally it would be nice if it would count lisp routines as one command. But this is not neccessary, only if its easily acheived.

Posted

I did but it doesn't explain how to find the number of changed objects.

Posted

Let me rephrase the question, how to count the number of changed objects after I run a command.

Posted

The code from suggested tread are using reactors to “spy” actions from current drawing – someone with more experience than me on reactors can be able to tell if this routine can be modified to count entities that were affected in surveyed session along with used command. I’m afraid that code poster is no longer member of the forum, so cannot ask him directly for help (see http://www.cadtutor.net/forum/showthread.php?t=43876).

My suggestion is to ask a moderator to join this post with the one quoted on post #2 to increase visibility of your issue.

 

Regards,

Posted

Well I've checked every possibility but I'm stuck.

I've tried using

 

vlr-acdb-reactor which supposed to be exaclty what I need:

 

"Constructs a reactor object that notifies when an object is added to, modified in, or erased from a drawing database"

 

The problem is, that if for example a line is modified, I move one endpoint, it calls the reactor lots of times. It seems that every command affects the number of calls differently if I move the end of a line, 10 calls if I move the start counts 4. If I move a text object that only calls it once. If I edit the value of a text it calls it twice.

 

How am I supposed to count this way?

 

I also tried vlr-object-reactor but it needs a list of objects to watch, so I'd have to constantly update this list with erased or added objects, which would take a lot of time on a large drawing.

Posted
Well I've checked every possibility but I'm stuck.

I've tried using

 

vlr-acdb-reactor which supposed to be exaclty what I need:

 

"Constructs a reactor object that notifies when an object is added to, modified in, or erased from a drawing database"

 

The problem is, that if for example a line is modified, I move one endpoint, it calls the reactor lots of times. It seems that every command affects the number of calls differently if I move the end of a line, 10 calls if I move the start counts 4. If I move a text object that only calls it once. If I edit the value of a text it calls it twice.

 

How am I supposed to count this way?

 

I also tried vlr-object-reactor but it needs a list of objects to watch, so I'd have to constantly update this list with erased or added objects, which would take a lot of time on a large drawing.

 

Psuedo code:

 

OnCommandStarted - setq active T

object modified/added/erased - add it's handle to a list

 

OnCommandEnded -

if active T?

Yes, remove duplicate handles from list

reset active to nil

write entry to log

end if

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...