Lisp loading but not working in cad 2017

Lisp loading but not working in cad 2017

kumarvinod469
Explorer Explorer
1,598 Views
3 Replies
Message 1 of 4

Lisp loading but not working in cad 2017

kumarvinod469
Explorer
Explorer

IV lisp for putting points and point numbers in cad and exporting point numbers with coordinates to excel csv file as well as making a table of the same by clicking an insertion point in cad.It was working fantastic in civil 3d 2013 32 bit version.But recently i tried to load it in cad 2017 ,lisp loaded but while using it get terminated after a few steps shows error messsage " "Cannot invoke (command) from *error* without prior call to (*push-error-using-command*). Converting (command) calls to (command-s) is recommended." Kindly help me in this regard.I change command to command-s in trap error but still not working.

0 Likes
1,599 Views
3 Replies
Replies (3)
Message 2 of 4

ВeekeeCZ
Consultant
Consultant

Now you going to cooperate? Last time you did not even bother to answer my question.

 

Follow the SCREENCAST  and tell us which line is causing  the error.

- type VLIDE

- mark "Break on Error"

- load and run the routine

- do to see "Last Break Source"

Message 3 of 4

roland.r71
Collaborator
Collaborator

The code is a bit big and chaotic, so i might have overlooked or misinterpreted something, but it looks like you store the "starting value" for the *error* function within the var: temperr

before asigning it your own function (setq *error* traperror)

Within the error trap (& elsewhere), the last thing you do is restore its original value. (Setq *error* temperr)

 

This way the problem might actually be caused by whatever is originaly there for the errortrapping.

 

Lets say you have 2 lisp, the first sets the *error* trap, using command, instead of command-s

The second is yours, storing the bad errortrap, using your own ones and reverting back to the wrong one set by lisp 1.

 

This (or something similar) is most likely (for now) as i didn't see any call to (command ...) from your traperror function with your posted code.

 

To prevent such errors and still keep the original error function, i personally always use a sub-function for errortrapping.

 

E.G.:

(defun c:IV (/ var var var)

   (defun *error* (msg)

      ; do whatever is needed on error

   )

 

   ; do whatever you wish your routine to do

)

0 Likes
Message 4 of 4

ronjonp
Mentor
Mentor

Your code works for me in AutoCAD 2019 x64.

0 Likes