Anyone know why I can't do the following in acaddoc.lsp:
(Command "edittime" "ON")
(Command "edittime "T" "5")
I get this result:
Unknown command "EDITTIME".
It looks like this has to do with the order of operation (i.e. express tools haven't been loaded yet). If so doesn anyone know how to load the express tools from acaddoc.lsp?
Solved! Go to Solution.
I changed the acaddoc so that the edittime command is accessed from S:tartup which should occur after express is loaded:
(defun mystartup () (command "EDITTIME" "ON") (command "EDITTIME" "T" "1") ) (if s::startup (setq s::startup (append s::startup (quote ((mystartup))))) (defun s::startup () (mystartup)) )
But it still doesn't work. I noticed if I type edittime at the command line it initializes. I'm assuming the express commands are demand loaded??? Maybe??? So frustrating because I want to set this to on for every users drawings. Anyone have any ideas?
Not sure about including it within acaddoc.lsp or initializing on startup, but try entering the following in order to initialize Edit Time and turn it on:
instead of the following line:
(Command "edittime" "ON")
Let me know if that works.
The express tools are either loaded automatically using either autoload or autoarxload. So if a user issues a command, it is automatically loaded. If the command is referenced directly with (c:edittime), it seems to be automatically loaded.
You could also explicitly load it and then use command to run it.
You could also call it with
(command "ACET:EDITTIME.EDITTIME" ....) anytime after loading.
Glad it worked. Not sure why really, I just happened to discover it the other day while helping someone else. It occured to me that a lot of times lisp functions are intiated with c:, so just decided to give c:edittime a try.
So I am glad for the additional info from dbroad.
By the way, there are a couple other postings that relate to this topic which may be of interest:
LISP to Export TIME Command Results to a Text File
how to print last line of command history to a file
Yep I'm tuned into those... In fact I started the second topic you hyperlinked. Basically what I created is a quick little lisp that runs on drawing open that writes a csv file with the name of the file opened, the time, the total edit time when opened and then does the same thing when the file is closed. I find it useful for tracking my time. Lee Mac's code is nice, but I opted for a simpler function or should I say one that I understand since I'm a beginner when it comes to writing lisps.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register