@john.uhden wrote:
I think I will disagree with you. I think that any function called within acad*.lsp can not call the command function. They can be defined, but not called. That's what S::STARTUP is for.
So I broke down and actually tried it, and in fact a function including a (command) function can be called from within acaddoc.lsp. I made a little file called TEST.lsp, containing this command definition:
(defun C:TEST ()
(command "_.circle" (getvar 'viewctr) 12)
)
(C:TEST)
in which the last line calls its own command when it's loaded [and I tested that, just to be sure, with APPLOAD in an already-open drawing -- merely load it, and the Circle is drawn]. That's the B) option in Post 3.
I then included this line [temporarily] in my acaddoc.lsp file:
(load "TEST")
and when I opened some other drawings [both existing and new], in each one the Circle was drawn.
Then I tried the C) option in Post 3 -- omitting the (C:TEST) self-calling line from TEST.lsp, and putting it into acaddoc.lsp after the (load "TEST") line. Same result.
AND THEN, just for a lark [not expecting it to work, because of the advice in Help], I tried just putting the (command) function itself:
(command "_.circle" (getvar 'viewctr) 12)
directly in acaddoc.lsp [the A) option in Post 3], and that also worked.
Kent Cooper, AIA