martyn3200 Posted December 17, 2014 Share Posted December 17, 2014 Is there a way of writing a selected amount of the command line history to a file via a lisp routine? An option to write analysis to file pops up when using the MASSPROP command (see attached screenshot). I wondered if it was possible to replicate something similar for lisp results that come up on the command line. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted December 19, 2014 Share Posted December 19, 2014 martyn , welcome to CADTutor for displaying result can use textpage , princ , prin1 , vl-princ-to-string , strcat etc.. example: (defun c:test (/ i) (textpage) (setq i 64) (repeat 26 (princ (strcat "\nascii " (itoa (setq i (1+ i)))" is "(chr i)))) (princ) ) ;_ end of defun variable last command line (getvar "lastprompt") we don't know what data you want to display in command line? you can post your example too. HTH Quote Link to comment Share on other sites More sharing options...
Hippe013 Posted December 19, 2014 Share Posted December 19, 2014 I am thinking that maybe something like this is what you are looking for. ;clears the log file (defun clrlogfile ( / f) (setq f (open (getvar "LogFileName") "w")) (write-line "" f) (close f) ) (clrlogfile);clears the logfile (setvar "logfilemode" 1);begin logging ;PRINT WHAT YOU WANT TO COMMAND LINE.... (setvar "logfilemode" 0);end logging (startapp "Notepad" (getvar "LogFileName"));open it up in notepad regards, hippe013 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 21, 2014 Share Posted December 21, 2014 Do you want a summary of commands used in a session and how long it took to do, we had a look at this to compare how many commands per staff per hours of work. Does lots of commands mean that operator is better ? Quote Link to comment Share on other sites More sharing options...
VVA Posted December 21, 2014 Share Posted December 21, 2014 Read this solution Quote Link to comment Share on other sites More sharing options...
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.