acaddoc is only loading 3/4 off the programs in the file

acaddoc is only loading 3/4 off the programs in the file

Anonymous
Not applicable
1,029 Views
13 Replies
Message 1 of 14

acaddoc is only loading 3/4 off the programs in the file

Anonymous
Not applicable

I've written about 80 program for me and the other designers at my company, and we have been manually adding them to the Startup Suite because I was unaware of the acaddoc.lsp file. I have created an acaddoc.lsp file and put a series of (load "_____") calls with all the program file names and have added the location to my filepath.

 

After restarting AutoCAD, only about 60 of the 80 programs are being loaded, and it gives the error "extra right paren on input". Manually entering (load "acaddoc.lsp") in the command line also gives the extra paren error. I have checked the acaddoc file as well as the last file loaded and the first file not loaded and there are no extra parenthesis. Anybody have any ideas what is going wrong?

0 Likes
Accepted solutions (1)
1,030 Views
13 Replies
Replies (13)
Message 2 of 14

pendean
Community Legend
Community Legend
can you share your file here?
0 Likes
Message 3 of 14

Anonymous
Not applicable

@pendean Here is the acaddoc file. It loads the programs up to RiseOfLine.lsp, and doesn't load anything after it.

0 Likes
Message 4 of 14

ВeekeeCZ
Consultant
Consultant
Accepted solution

The error is exactly what it says: "extra right paren on input"

So you have at least 1 more right parent in the code than required.

0 Likes
Message 5 of 14

fkellogg
Advocate
Advocate

I am a HUGE fan of the acaddoc file.

I call it my "pgp file on steroids", because I mostly use it to create defun command combinations for keyboard input.

I have over 250 of these; for instance:
(defun C:elp ( ) (command "pellipse" "1" "ellipse" )
(princ "Ellipse By Polyline Method " )(princ) )

OR
(defun C:f36 ( ) (command "fillet" "radius" ".1875" "fillet" "Multiple" )
(princ "Multiple Fillet At 3/16 Inch " )(princ) )

 

All I can suggest is very diligent search for that extra parenthesis.

Break the acaddoc into "segments" and paste each segment in, until it fails.

I'm not a big programmer, I'm just excited to see someone else using the accadoc file.

0 Likes
Message 6 of 14

Anonymous
Not applicable

I've checked and there isn't an extra parenthesis in the acaddoc file or the files where it stops loading

0 Likes
Message 7 of 14

rkmcswain
Mentor
Mentor

The loading of that file will stop when it encounters an error.

Have you tried loading it via VLIDE and then review the output log?

 

R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 8 of 14

Anonymous
Not applicable

I'm pretty sure I'm going crazy, I triple checked the program that wasn't loading before posting here and there wasn't an extra paren, but now looking at it, there is. I'm using notepad++ so not sure how I missed it.

Message 9 of 14

pendean
Community Legend
Community Legend
Your error might be one of those other LISP files after RiseOfLine.LSP: start the slow painful elimination each of the ones after it.
0 Likes
Message 10 of 14

ВeekeeCZ
Consultant
Consultant

Great you solved it!

Because the file you've posted certainly does not have any extra parent.

0 Likes
Message 11 of 14

Moshe-A
Mentor
Mentor

@Anonymous ,

 

the extra right paten may be in one (or more) lisp files been loaded by acaddoc.lsp

so to find it use multiple line comment:

 

;| start multiline comment

 

 

end multiline comment  |;  

 

start commenting half of acaddoc.lsp and narrow it each time by half until you reach the problematic line 😀

are you using vlide?

 

Moshe

Message 12 of 14

Sea-Haven
Mentor
Mentor

Your loading a massive amount of lisps there are better ways of loading when required, I use a lot of menu and toolbars and they have the Load as part of the command sequence. The other option is to use Autoload rather than load this will load when you issue the command .

 

"The AutoLoad function enables a user to load an AutoLISP file when a specific command is entered at the command line. This can greatly reduce the time taken to open a drawing and the memory used should the user wish to load many programs automatically as programs are only loaded into the drawing session when required by the user."

 

(autoload "COPY0" '("COPY0"))
(autoload "COPYCOMMAND" '("ZZZ"))
(autoload "COVER" '("COVER"))

0 Likes
Message 13 of 14

Anonymous
Not applicable

That's good to know, I will definitely look into this! Thanks!

0 Likes
Message 14 of 14

Sea-Haven
Mentor
Mentor

You will have to find the C:xxxxx in each lisp thatstarts the program, but very easy to change.

0 Likes