LOAD error

LOAD error

Lineabove
Collaborator Collaborator
1,149 Views
4 Replies
Message 1 of 5

LOAD error

Lineabove
Collaborator
Collaborator

Hello Forum,

 

If I load the attached file I will receive an:

 

Command: _appload LOAD on Error.lsp successfully loaded.


Command: C:0CURRENT
error: bad character read (octal): 0
Cannot invoke (command) from *error* without prior call to (*push-error-using-command*).
Converting (command) calls to (command-s) is recommended.

 

 

What I do not understand is that if I load all the files individually, there is no error.

 

I am stumped.

All suggestions are appreciated.

 

 

Mel

 

 

 

 

 

0 Likes
1,150 Views
4 Replies
Replies (4)
Message 2 of 5

Ranjit_Singh
Advisor
Advisor

Looks like you are calling the routine as C:0Current. I believe it should be 0Current without the c:

0 Likes
Message 3 of 5

Lineabove
Collaborator
Collaborator

Hi Ranjit,

 

Thank for your reply.

 

The actual line is:

(princ (load "C:/Program Files/Architecture Custom/Acad Startup Suite/0Current.lsp" "\n0Current.lsp not loaded"))

 

I verified that the Lisp is named 0Current.lsp

 

The lsp file is:

(defun C:0Current ()
(command "_.layer" "_Thaw" "0" "_Make" "0" "_Color" "White" "" "_Ltype" "Continuous" "" "_LWeight" "0" "" "_PStyle" "0" "" "")
    (princ)
  )

 

The C: is so I may call as an AutoCAD command.

 

?

 

0 Likes
Message 4 of 5

Ranjit_Singh
Advisor
Advisor

Yes the C: means you can invoke it at command prompt. You do not need to type c: when invoking the function. You have to type it when your function has arguments, but then you are really calling it as a lisp statement such as (c:somefunc arg1 arg2 ...); and not as a native autoCAD command.

However you function does not take any argument and so should be called as native autoCAD command, that is without the c:

0 Likes
Message 5 of 5

john.uhden
Mentor
Mentor

What @Ranjit_Singh said is dead on (which is pretty much true of whatever he says).

 

You could save yourself a little typing by adding...

(defun c:0C ()(c:0Current))

 

That way, at the command prompt you could enter either "0Current" or just "0C" (both without including the quotes).

John F. Uhden

0 Likes