bobafuka Posted January 27, 2010 Posted January 27, 2010 I have another program that outputs the information of the CMDSPY routine to a spreadsheet. This then adds up all the numbers and calcs an average over time.... Quote
feargt Posted January 27, 2010 Author Posted January 27, 2010 While ASMI originaly provided me with what I had requested I found that i could not really use the information any further. The path I took was,(for my purposes) to see how many steps were involved in doing a particular task. Automate it as much as possible. Then compare how many steps it takes now compared to previously. Now I have a figure to show management that I have increased the efficiency on this task by whatever percentage. That way this statistic applies to everyone irrelevant of how fast they are. Quote
kosio_gerasimov Posted February 1, 2010 Posted February 1, 2010 Hey guy, I see a good discussion has been formed here. First to answer bobafuka: the program do not output number_of_commands/time_spent_in_commands ratio because it can be misleading. It can be misleading not only in the sense that have already been discussed but as well because some commands take zero time to complete (like undo, redo, save etc) while other require too much time (the ones which require user dialog). So from this point of view they are not comparable and averaging them will only distort the statistics. The other thing I want to point out - FOR GOD"S SAKE, DO NOT SHOW THIS STATISTICS TO BOSSES WHO DO NOT UNDERSTAND AUTOCAD AT ALL. This is supposed to be a tool for those who know how to customize their AutoCAD environment and want a way to make a quantitative analysis. Everything is strictly task-specific and this is I have left a place for comments and conclusions after each report on the editing session. If anybody have any other ideas and request, please write my an e-mail. Best wishes Quote
bobafuka Posted February 1, 2010 Posted February 1, 2010 Kosio, I can agree with your comments in their spirit, but in a report using the stats that the report already provides - with the additional information of a "commands per minute" ratio/figure, can be easier to present the benefits of certain customisations which are not fully understood by management. Over a prolonged period, the deviations would iron out your concerns about statistical accuracy. It would still be a useful figure to ascertain as an indicator. Forgive me if I sound facetious, but it really shouldn't be called a "productivity" tool. The actual number is not really relevent, but the process of comparison is the point. If all the results are obtained via the same process or calculation a comparison or unit can be created. Calling it productivity is really the problem here. Having several files open at one time will deform the results. Which is where the total time of commands figure comes in handy... Each report on it's own would only serve to assess the work or commands carried out in a specific dwg, agreed - I open approx 700 dwgs aweek and don't do work in every one per se. And the stats generated from these dwgs being opened would be detrimental to any stats I present, but in the files that I do work in, the stats could still be levelled out over time. Out putting the information to a spreadsheet, has proven satisfactory thus far. I've tried diddling the variables in the routine but can't get the formats right...... I'm not great at lisp.... but I still would appreciate the code, please, if possible. Quote
NBC Posted March 9, 2010 Posted March 9, 2010 Kosio, is there a possibility to change the location output of the reports to a specified directory, instead of the current default of placing it into the same folder as the drawing file ? Quote
M76 Posted March 11, 2010 Posted March 11, 2010 I'm having problems with acdb-reactor, it reports false information, the counter goes crazy. 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. Quote
ollie Posted March 12, 2010 Posted March 12, 2010 I've been thinking of a similar idea recently for staff proficiency monitoring. My main issue is when to update a global data set or rather when to write details to an external file. Swaying towards onSave just now but that won't work all the time Quote
BIGAL Posted March 12, 2010 Posted March 12, 2010 I will probably down load the code because I have 8 staff and we have various probelms with them in particular time management (they go wandering) I find them sometimes in other areas of our building, why are you here ? We have annual staff reviews and they all ask for a raise it would be handy to use some background info to say yes but they must improve. Any way on the other side I wrote a lisp that did one task old way manually 40 mins lisp 40 secs. take that to the boss. If you really want to improve productivity ask your staff and it is difficult to get them to not watch the fly going up the wall at the time your asking what do they continually repeat as a number of steps. A couple of minutes saved by 8 =16mins / hour = 3850 mins /year = $1600 / year 1 task ! Were always trying to add these tiny routines rather than tackle a massive task. We also share any info or shortcuts say from forum here found another last week a command I knew nothing about but will saves us from getting frustrated with 3d line work. Even look at the the command logger maybe the way they use commands I know that our guys do trims in about 3 different ways is a second or two really going to add up maybe over a year ? Quote
moatt Posted July 21, 2015 Posted July 21, 2015 Hey guys, sorry to resurrect a 5 year old thread, but I'm trying to get this lisp to work and not having any luck. I'm using AutoCAD 2015, and I've tried creating each of these as separate routines (cmdspy, cmdreaction and lookcmdlist) and all in one lisp (lookcmdlist), but they all give me a result of "No command history found." regardless of how many commands I've run prior to running the lisp. I love this lisp, it's everything I need for a project I'm working on, and it's more advanced than my current lisp skills to diagnose on my own. Any thoughts? Is it something that was disabled in AutoCAD 2015? Thanks! Quote
Lee Mac Posted July 21, 2015 Posted July 21, 2015 (edited) Copy the following code to a single .lsp file, load the file in AutoCAD, use a few commands, and then type VIEWCMD to view the report: (defun c:viewcmd nil (if (or cmdspy:endlst cmdspy:unklst cmdspy:canlst) (progn (mapcar 'cmdspy:print '("Completed Commands" "Cancelled Commands" "Unknown Commands") (list cmdspy:endlst cmdspy:canlst cmdspy:unklst) ) (textscr) ) (princ "\nNo command history found.") ) (princ) ) (defun cmdspy:updatelist ( cmd lst / itm ) (if (setq itm (assoc cmd lst)) (subst (cons cmd (1+ (cdr itm))) itm lst) (cons (cons cmd 1) lst) ) ) (defun cmdspy:print ( hed lst / len ) (if lst (progn (setq len (/ (- 30 (strlen hed)) 2)) (princ "\n\n ") (repeat len (princ "-")) (princ " ") (princ hed) (princ " ") (repeat len (princ "-")) (foreach itm (vl-sort lst '(lambda ( a b ) (> (cdr a) (cdr b)))) (princ (strcat "\n " (car itm) " ")) (repeat (- 30 (strlen (car itm)) (strlen (itoa (cdr itm)))) (princ ".")) (princ (strcat " " (itoa (cdr itm)))) ) (princ (strcat "\n TOTAL: " (itoa (apply '+ (mapcar 'cdr lst))))) ) ) ) ( (lambda nil (vl-load-com) (mapcar '(lambda ( s1 s2 ) (eval (list 'defun s1 '( obj arg ) (list 'setq s2 (list 'cmdspy:updatelist '(strcase (car arg)) s2)) ) ) ) '(cmdspy:endfun cmdspy:unkfun cmdspy:canfun) '(cmdspy:endlst cmdspy:unklst cmdspy:canlst) ) (if (null cmdspy:reactor) (setq cmdspy:reactor (vlr-command-reactor "cmdspy" '( (:vlr-commandended . cmdspy:endfun) (:vlr-unknowncommand . cmdspy:unkfun) (:vlr-commandcancelled . cmdspy:canfun) ) ) ) ) (princ) ) ) Edited July 21, 2015 by Lee Mac Quote
moatt Posted July 21, 2015 Posted July 21, 2015 Thanks for the reply. Unfortunately, it's still not working. I copied the entire script into a lisp file, saved it as "ViewCMD.lsp", loaded it into my autocad. Drew some lines, copied some things, erased some things, then ran the routine. "No command history found." So I removed it and all the previous versions from this thread, loaded it into my startup suite and restarted autocad. Same thing. I'm familiar enough with lisps that I feel confident I'm installing it correctly, but it returns the same "No command history found." with all versions. Is there a setting in my autocad I'm missing, maybe? Thanks again for the help. It's much appreciated. Quote
Lee Mac Posted July 21, 2015 Posted July 21, 2015 Firstly, I've just tested the program and all performs well for me. Do you receive any errors when loading the code? (use F2 to view your command-line history) What OS are you running? (I've just tweaked the code to refine the output report, but this won't affect your results) Quote
Tharwat Posted July 21, 2015 Posted July 21, 2015 Firstly, I've just tested the program and all performs well for me. Tested here and it works very well Outcome: ------ Completed Commands ------ CIRCLE ....................... 1 LINE ......................... 1 TOTAL: 2 Quote
moatt Posted July 21, 2015 Posted July 21, 2015 Weird. F2 is undo for me, but I stretch my command line up to before the lisp was entered, I didn't see any errors. I installed the same file on another computer in our office running AutoCAD 2012 and it ran perfectly. Same lisp routine, loaded the same way, both on Windows 7. 2012 works. 2015 doesn't. I'm thinking something was tweaked in 2015 that disables something in the lisp, but I have no idea what. What version did you run it on? Thanks again. I may be out of luck, which is bad because I really need this or some variant of it, but if it doesn't work in 2015 then I don't know what to do. Quote
Lee Mac Posted July 21, 2015 Posted July 21, 2015 Tested here and it works very well Thanks Tharwat Weird. F2 is undo for me, but I stretch my command line up to before the lisp was entered, I didn't see any errors. Be careful - sometimes LISP errors are only displayed in the text window, and not in an enlarged command-line; if you have remapped F2, type (textscr) to view the command-line history. What version did you run it on? Tested in AutoCAD 2015: ------ Completed Commands ------ CIRCLE ....................... 5 PLINE ........................ 2 TOTAL: 7 Quote
moatt Posted July 21, 2015 Posted July 21, 2015 Wow, weird. Ok, I installed it on another 2015 computer here, and it worked perfectly. But my computer, for some reason, will not do it. I used textscrn and there were no errors. Command: VIEWCMD No command history found. Command: Command: TEXTSCR I can't figure out what's different on my computer. I've never had any other issues off of it. But this just doesn't work. I even uninstalled the lisp routine again and reinstalled is using the exact same steps that I used on the other computers here that worked, but it still does nothing. At least I can use it on some computers. That's a step in the right direction! Quote
Lee Mac Posted July 21, 2015 Posted July 21, 2015 Please load the attached debug version, run a couple of commands, try the VIEWCMD command, and then please post the full command-line output from the point of loading - we can then try to diagnose the issue. Lee CommandCountV1-0-debug.lsp Quote
moatt Posted July 21, 2015 Posted July 21, 2015 Thanks! I didn't expect anyone to go this far out of their way to help out. I really appreciate it. That being said... Command: XL XLINE Specify a point or [Hor/Ver/Ang/Bisect/Offset]: Specify through point: Specify through point: Specify through point: Command: TR TRIM Current settings: Projection=UCS, Edge=None Select cutting edges ... Select objects or <select all>: Specify opposite corner: 1 found Select objects: Select object to trim or shift-select to extend or [Fence/Crossing/Project/Edge/eRase/Undo]: Specify opposite corner: Specify opposite corner: Select object to trim or shift-select to extend or [Fence/Crossing/Project/Edge/eRase/Undo]: Command: C CIRCLE Specify center point for circle or [3P/2P/Ttr (tan tan radius)]: Specify radius of circle or [Diameter]: Command: VIEWCMD VIEWCMD command evaluated. No command history found. VIEWCMD command completed. Command: Command: TEXTSCR Quote
Lee Mac Posted July 21, 2015 Posted July 21, 2015 You're welcome. Could you please post the command-line history from the point of loading the program? Quote
moatt Posted July 21, 2015 Posted July 21, 2015 Oh, duh. Sorry. Command: APPLOAD CommandCountV1-0-debug.lsp successfully loaded. Command: Command Counter by Lee Mac - Debug Version. Loading ActiveX (COM). ActiveX (COM) Loaded. Defining reactor callback functions. Defined CMDSPY:ENDFUN. Defined CMDSPY:UNKFUN. Defined CMDSPY:CANFUN. Creating command reactor. cmdspy:reactor variable null - creating new reactor.; error: no function definition: VLR-COMMAND-REACTOR Command: XL XLINE Specify a point or [Hor/Ver/Ang/Bisect/Offset]: Specify through point: Specify through point: Specify through point: Command: TR TRIM Current settings: Projection=UCS, Edge=None Select cutting edges ... Select objects or <select all>: Specify opposite corner: 1 found Select objects: Select object to trim or shift-select to extend or [Fence/Crossing/Project/Edge/eRase/Undo]: Specify opposite corner: Specify opposite corner: Select object to trim or shift-select to extend or [Fence/Crossing/Project/Edge/eRase/Undo]: Command: C CIRCLE Specify center point for circle or [3P/2P/Ttr (tan tan radius)]: Specify radius of circle or [Diameter]: Command: VIEWCMD VIEWCMD command evaluated. No command history found. VIEWCMD command completed. Command: Command: TEXTSCR There's an error... Quote
Recommended Posts
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.