Help with getting Lisp working

Help with getting Lisp working

jbarnes84SUH
Contributor Contributor
783 Views
13 Replies
Message 1 of 14

Help with getting Lisp working

jbarnes84SUH
Contributor
Contributor

Can anyone rewrite this lisp to get it working? I keep getting a error restoring system variables. Please help. This is for making shipping boxes and the original author has passed away and I have no idea how to fix it .

0 Likes
Accepted solutions (2)
784 Views
13 Replies
Replies (13)
Message 2 of 14

cadffm
Consultant
Consultant

Hi,

 

and you don't thinking that it could be a good idea to share your program name/version and the original log ?

Open a file, load and run the program 

share the text log [F2]

 

Sebastian

0 Likes
Message 3 of 14

Kent1Cooper
Consultant
Consultant

@jbarnes84SUH wrote:

.... I keep getting a error restoring system variables. ....


That error handler should have its wording changed.  It's not that there's a problem in restoring the system variables, but any error will cause that alert, which should say something more like "ERROR:  RESTORING SYSTEM VARIABLES."  In other words, "There has been an error, and I'm restoring the system variables."

 

The error is somewhere else, but that's a heck of a lot of code -- I haven't plowed through looking for something.  Can you give us any more direction?  For example, can you tell how far it got before whatever error happened?

Kent Cooper, AIA
Message 4 of 14

jbarnes84SUH
Contributor
Contributor

Thanks for the quick reply. As soon as a start the Lisp I immediately get the error

0 Likes
Message 5 of 14

jbarnes84SUH
Contributor
Contributor

I am using Autocad 2024

0 Likes
Message 6 of 14

jbarnes84SUH
Contributor
Contributor
AutoCAD menu utilities loaded.; error: bad argument type: stringp nil
; error: bad argument type: stringp nil
Command:
Command:
Command:
Command: Specify opposite corner or [Fence/WPolygon/CPolygon]: *Cancel*
Command: *Cancel*
Command: *Cancel*
Command: GZBOX
Command:
0 Likes
Message 7 of 14

Kent1Cooper
Consultant
Consultant

@cadffm wrote:

.... share the text log [F2]


I'm not sure how much good that would do -- the routine suppresses command echoing, so the command-line history revealed by F2 might show a few things, but would be missing a lot of what went on [or didn't].

Kent Cooper, AIA
Message 8 of 14

Kent1Cooper
Consultant
Consultant

I notice that the Setup and the Main routine are separate command names, rather than having the setup embedded in the main command.  Do you run the GZSETUP command before you run the GZBOX command?

Kent Cooper, AIA
Message 9 of 14

jbarnes84SUH
Contributor
Contributor
I have tried to run GZSETUP and I get this

Command: GZSETUP
; error: bad argument type: stringp nil
Command:
0 Likes
Message 10 of 14

Kent1Cooper
Consultant
Consultant

@jbarnes84SUH wrote:
I have tried to run GZSETUP and I get this

Command: GZSETUP
; error: bad argument type: stringp nil

I see the first line in the definition of GZSETUP is:

(SETQ LOAD_VALUE (LOAD_DIALOG (STRCAT GZPTH "BOX")))

but there's nothing that will have put a text-string value into the GZPTH variable prior to that, which would cause exactly that error if that variable hasn't been established from outside this routine in advance.  The same occurs numerous times later in the code.  Where is GZPTH supposed to be coming from?

Kent Cooper, AIA
Message 11 of 14

jbarnes84SUH
Contributor
Contributor
I am not sure , I'm a little new at understanding Lisp's . Is GZPTH the path or something ? Sorry
0 Likes
Message 12 of 14

cadffm
Consultant
Consultant

Hi,

looks like you have other problems too

"AutoCAD menu utilities loaded.; error: bad argument type: stringp nil
; error: bad argument type: stringp nil"

 

I am not in front of my PC,

but is there a .DAT file missing?

And .DCL 

 

I am not in front of my PC, so another must help

Sebastian

0 Likes
Message 13 of 14

Kent1Cooper
Consultant
Consultant
Accepted solution

@jbarnes84SUH wrote:
.... Is GZPTH the path or something ? ....

I think so.  It's something that would have "BOX" tacked onto the end for loading a dialog box, and your .dcl file is BOX.dcl, so a file path would make sense.  Try this before running the setup command:

 

(setq GZPTH "C:\\The\\File\\Path\\Where\\BOX.dcl\\lives\\")

 

using the real drive and file path.  Note that backslashes are doubled.

Kent Cooper, AIA
Message 14 of 14

jbarnes84SUH
Contributor
Contributor
Accepted solution
Holy **** , you are the man ! that fixed it !
0 Likes