TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: V-Man on November 30, 2004, 09:16:44 AM

Title: Lisp Error Conundrums
Post by: V-Man on November 30, 2004, 09:16:44 AM
Why is that on some machines, some lisp routines run differently, and/or don't run at all? Is there some kind of sys var that is different? I'm having this problem so I compared the system variables from bot machines (One that "it works" and the one that "don't work") and I don't see any major differences.

Does anyone else have the same issues/problems as I?

Thanks for the input.
Title: Lisp Error Conundrums
Post by: Keith™ on November 30, 2004, 09:36:13 AM
There can be issues such as other programming that is utilized in the loaded lisp that it cannot find. System variables can affect programs if they are not written properly. Also I have seen things such as graphics card resolution have a serious impact on the selection of entities via lisp and points.
 That is why it is so important to check the program on several different computers and versions before allowing it to be used for general use.
Title: Lisp Error Conundrums
Post by: SMadsen on November 30, 2004, 09:38:32 AM
Just a few possible hunches:
- Different versions of AutoCAD?
- Different search path setup?
- Different file setups? Some have a function like VL-LOAD-COM loaded in an MNL file or by some other routine loaded in advance of the one that seems to fail. Are your lsp files depending on library routines which are missing on some machines?
Title: Lisp Error Conundrums
Post by: V-Man on November 30, 2004, 09:49:30 AM
Quote

Are your lsp files depending on library routines which are missing on some machines?


No, here in our office I set up on every machine a ACADDOC.lsp file for which it loads a "AutoLoad.lsp" file on the server. Inside that autoload lisp it autoloades  many different lisp routines for which everone's machine is the same. Autocad versions and paths are also the same. This is just a weird anomoly that has been bugging me for a while. For example,

(setvar "clayer" "0")

Does not work all the time. On some machines it gets an error.
Title: Lisp Error Conundrums
Post by: CAB on November 30, 2004, 10:24:48 AM
What is the error message?

Is lsyer 0 locked?
Title: Lisp Error Conundrums
Post by: V-Man on November 30, 2004, 10:34:29 AM
Quote

What is the error message?

Is lsyer 0 locked?


Ahh, that might be the culpret on this one but there still lies the problem with some routines working on some machines while not working on others.

Thanks for the "layer 0" fix. I need to update the routine to make sure Layer 0 is not off or frozen or locked.
Title: Lisp Error Conundrums
Post by: JohnK on November 30, 2004, 10:43:09 AM
Don the title of this thread is a little vague. Could you rename it to something a little more descriptive?

Thanx
Title: Lisp Error Conundrums
Post by: SPDCad on November 30, 2004, 11:07:56 AM
Quote from: dvarino
Quote

Ahh, that might be the culpret on this one but there still lies the problem with some routines working on some machines while not working on others.

Thanks for the "layer 0" fix. I need to update the routine to make sure Layer 0 is not off or frozen or locked.


I have similar problems with some of my lisp and certain autocad users as you are having with certain computers.  You may find it may be more of the autocad users then the computer that is at fault on the lisp errors.  
You may find yourself rewriting a lot of code to trap user errors, then computer
errors.
Yes, I have had computer errors also. They usually involve different hardware setup, but this case are rare to me.

My advice is to also check the user, as well as the computer and in that you may  find  answers.

Good luck with the hunt! :)
Title: Lisp Error Conundrums
Post by: V-Man on November 30, 2004, 11:08:34 AM
Here's one that is giving me problems. On some machines this works but others do not.

Code: [Select]

  (setq lin2 (tblsearch"LTYPE" "DASHED"))
     (if  (= lin2 nil)
  (command "-LINETYPE" "LOAD" "DASHED" "" "")
  (prompt "\nThe linetype is already loaded" )
     )


Basically Autocad hangs up and then crashes and give me C++ errors. Very strange.