Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

End of one line is start of another

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
dicra
335 Views, 4 Replies

End of one line is start of another

Hi everybody,

 

I am having a problem with starts and ends of lines. I have draw two lines, end of first is start of second. The problem is because, (cdr (assoc 11 (entget line1))) and (cdr (assoc 10 (entget line2))), somehow, are not the same,

 

(= (cdr (assoc 11 (entget line1))) (cdr (assoc 10 (entget line2)))) 

is returning nil, what is so confusing to me is that:

 

(=(nth 0(cdr (assoc 11 (entget line1)))) (nth 0(cdr (assoc 10 (entget line2)))))

is returning true, the same is for y and z coordinates.

 

Is anybody having an answer to this problem, or or I need to check x y and z coordinates, for this type of problem...

 

Thanks at advance

4 REPLIES 4
Message 2 of 5
hmsilva
in reply to: dicra

(equal (cdr (assoc 11 (entget line1))) (cdr (assoc 10 (entget line2))))

Henrique

EESignature

Message 3 of 5
pbejse
in reply to: dicra

Read up on equal function then you'll understand

 

(equal (cdr (assoc 11 (entget line1))) (cdr (assoc 10 (entget line2))))

 

HTH

 

EDIT: oops.. I'm too slow  😄

Message 4 of 5
dicra
in reply to: pbejse

Thanks for such a quick answers,

As always you are helping me a lot...

 

Smiley Happy

Message 5 of 5
hmsilva
in reply to: dicra

@pbejse

 

only a few seconds... Smiley Wink

 

@dicra

 

You're welcome!

Glad I could help

 

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost