Error: extra cdrs in dotted pair on input

Error: extra cdrs in dotted pair on input

alexander_palsson4FQND
Participant Participant
803 Views
10 Replies
Message 1 of 11

Error: extra cdrs in dotted pair on input

alexander_palsson4FQND
Participant
Participant

Hi

I have  tried to modify a Lisp routine my predecessor  made. Originally it changed layers on certain objects in a drawing. I also want to delete certain objects that are superfluous. I thought I got the hang of it when I sucessfully tested my modified Lisp on a specific object, but after adding code to cover the rest of the objects I wanted to get rid of, it no longer worked. The Lisp routine does not load on start as before and when I use drag and drop the command prompt reads "; error: extra cdrs in dotted pair on input".

0 Likes
Accepted solutions (2)
804 Views
10 Replies
Replies (10)
Message 2 of 11

EnM4st3r
Advocate
Advocate
Accepted solution

in Line 73 you are missing a Quote

EnM4st3r_0-1689319219620.png

 

Message 3 of 11

alexander_palsson4FQND
Participant
Participant

You made my day, thank you! Any tips on how to debug my code? I use notepad to edit but when the lines starts to add up...

0 Likes
Message 4 of 11

paullimapa
Mentor
Mentor
Accepted solution

You are missing quotes here in this section of your code:

paullimapa_0-1689319808352.png

Now it successfully loads but not sure if it all runs properly.

You'll have to test the various functions on your drawings.

 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 11

EnM4st3r
Advocate
Advocate

Im using Visual Studio Code with AutoLisp extension for debugging. You can link it with your open drawing, works pretty well for me.

 

Oh and also you maybe already saw it but there are also quotes missing in the Lines 75,77 and 79. 😉

Message 6 of 11

paullimapa
Mentor
Mentor

I use Visual Studio Code.

The way I debugged this is copying out various sections of your code to see if those load successfully.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 7 of 11

komondormrex
Mentor
Mentor

hey,

you need not compare sset with nil like this.

(if (/= (ssget "_X" '((8 . "Baskarta_grafikAgoslagsgrans_s"))) nil)

if it is it is, othewise nil.

(if (ssget "_X" '((8 . "Baskarta_grafikAgoslagsgrans_s")))

 

Message 8 of 11

EnM4st3r
Advocate
Advocate
wait you not using the AutoLisp extension? Because this gives you the Line and the positon in an instant
0 Likes
Message 9 of 11

paullimapa
Mentor
Mentor

these are the extensions I currently have loaded:

paullimapa_0-1689320682647.png

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 10 of 11

alexander_palsson4FQND
Participant
Participant

Interesting I was actually wondering about that particular part of the code. Your solution looks a lot better :). Thank you!

0 Likes
Message 11 of 11

alexander_palsson4FQND
Participant
Participant

Thank you everyone for fixing my error and your tips on editor. I have just installed Visual code and I love it!