dig Posted May 23, 2010 Author Posted May 23, 2010 @Lee Mac What you've done there it's a little bit complex.The connection element must be just a single line. @alanjt Exactly what you've done to show you that imagine,but the lines inside the circles must not be visible.Basically the same thing with this minor aspect.No more visible lines inside the circles. Quote
Cad64 Posted May 23, 2010 Posted May 23, 2010 I can't give you a picture because i don't have enough posts to do it. Please click the link in my signature. Quote
Lee Mac Posted May 23, 2010 Posted May 23, 2010 @Lee Mac What you've done there it's a little bit complex.The connection element must be just a single line. @alanjt Exactly what you've done to show you that imagine,but the lines inside the circles must not be visible.Basically the same thing with this minor aspect.No more visible lines inside the circles. Perhaps if you explained yourself better you would be sorted by now. Quote
dig Posted May 23, 2010 Author Posted May 23, 2010 Thank you cad64 for the info. So that's what i need.There are no specifications about sizes. Quote
Lee Mac Posted May 23, 2010 Posted May 23, 2010 Try this: (defun c:cc ( / e1 e2 ) ;; © Lee Mac ~ 23.05.10 (vl-load-com) (if (and (setq e1 (car (entsel "\nSelect First Circle: "))) (eq "CIRCLE" (cdr (assoc 0 (entget e1))))) (while (and (setq e2 (car (entsel "\nSelect Next Circle: "))) (eq "CIRCLE" (cdr (assoc 0 (entget e2))))) (line (vlax-curve-getClosestPointto e2 (cdr (assoc 10 (entget e1)))) (vlax-curve-getClosestPointto e1 (cdr (assoc 10 (entget e2))))) (setq e1 e2) ) ) (princ) ) (defun line ( p1 p2 ) (entmakex (list (cons 0 "LINE") (cons 10 p1) (cons 11 p2) ) ) ) Quote
Lee Mac Posted May 23, 2010 Posted May 23, 2010 For multiple: (defun c:ccm ( / ss ) ;; © Lee Mac ~ 23.05.10 (vl-load-com) (if (setq ss (ssget '((0 . "CIRCLE")))) ( (lambda ( i / e1 e2 j ) (while (setq j (1+ i) e1 (ssname ss (setq i (1+ i)))) (while (setq e2 (ssname ss (setq j (1+ j)))) (line (vlax-curve-getClosestPointto e2 (cdr (assoc 10 (entget e1)))) (vlax-curve-getClosestPointto e1 (cdr (assoc 10 (entget e2))))) ) ) ) -1 ) ) (princ) ) (defun line ( p1 p2 ) (entmakex (list (cons 0 "LINE") (cons 10 p1) (cons 11 p2) ) ) ) Quote
Lee Mac Posted May 23, 2010 Posted May 23, 2010 As an aside, for the multiple connections program the number of connections for n circles will be the (n-1)th Triangle Number, or: n(n-1)/2 Lee Quote
dig Posted May 23, 2010 Author Posted May 23, 2010 The program doesn't work.I don't know why.After selecting the objects,the program doesn't return anything.It asks for objects continuously. What about your last post?Where should i introduce that piece of code? Quote
Lee Mac Posted May 23, 2010 Posted May 23, 2010 Both work for me, but I am done with this thread. If you can't get it to work, I'm sure other members will assist. I'm fed up with your attitude towards our voluntary help and so depart from continued participation in this thread. Quote
dig Posted May 23, 2010 Author Posted May 23, 2010 I really don't know what is the problem with the last two codes.The other code posted by you works properly but these two don't. I think that i already mentioned that i am a newbie in Lisp.I really don't know the reason why are you so pissed,because all i wanted to know was the code for this problem.I didn't flame anybody,i was just hoping to get something from you.I know that is called voluntary help and i'm sorry that i waste your time with my "garbbage".Thank you anyway Lee.,and i hope that somebody can help me with my problem Thanks ! Quote
Lee Mac Posted May 23, 2010 Posted May 23, 2010 I suppose I was just getting irritated with how the thread wasn't really 'progressing'. It could be that the Visual LISP functions weren't loaded - most of us have (vl-load-com) in the ACADDOC.lsp, so we don't notice if its missing. I have updated the codes to account for this, please try them. Quote
dig Posted May 24, 2010 Author Posted May 24, 2010 Now the codes are working just fine. Thank you Lee and thank you everybody for your support. Quote
Lee Mac Posted May 24, 2010 Posted May 24, 2010 I'm surprised it didn't throw an error before, but glad its working now. Quote
Lee Mac Posted May 24, 2010 Posted May 24, 2010 BTW, you might be interested to see here - I took the routine a bit further. You may have to become a member first to see it though Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.