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

Trying to set edittime to on in Acaddoc.lsp

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
scotts
494 Views, 8 Replies

Trying to set edittime to on in Acaddoc.lsp

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? 

 

Thanks!

_Scott

8 REPLIES 8
Message 2 of 9
scotts
in reply to: scotts

Update. 


I changed the acaddoc so that the edittime command is accessed from S::Startup 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?

 

Message 3 of 9
gjrcmb
in reply to: scotts

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:

(c:edittime)
(command "ON")

instead of the following line:

(Command "edittime" "ON")

 

Let me know if that works.

Message 4 of 9
scotts
in reply to: gjrcmb

Thanks.  It works.  But why??? 

Message 5 of 9
dbroad
in reply to: scotts

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.

 

(arxload "edittime")

(command "edittime"....)

 

You could also call it with

(command "ACET:EDITTIME.EDITTIME" ....) anytime after loading.

Architect, Registered NC, VA, SC, & GA.
Message 6 of 9
gjrcmb
in reply to: dbroad

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.

Message 7 of 9
gjrcmb
in reply to: gjrcmb

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
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/LISP-to-Export-TIME-Command-Results-t...

how to print last line of command history to a file
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/how-to-print-last-line-of-command-his...

Message 8 of 9
scotts
in reply to: gjrcmb

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.

Message 9 of 9
gjrcmb
in reply to: scotts

Ah sorry, didn't make the connection.  Glad I could be of further assistance.  Interesting topic.

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

Post to forums  

Autodesk Design & Make Report

”Boost