dlanorh Posted September 8, 2018 Posted September 8, 2018 3 hours ago, Tharwat said: https://www.cadtutor.net/forum/topic/65914-error-extra-right-paren-on-input/?tab=comments#comment-542102 Not again Quote
dlanorh Posted September 8, 2018 Posted September 8, 2018 3 hours ago, drdownload18 said: I'm still getting same error Re: My last and taking into account Tharwat's post that line should be : (entmake '((0 . "POLYLINE") (70 . 8))) Quote
Tharwat Posted September 8, 2018 Posted September 8, 2018 2 minutes ago, dlanorh said: Not again No worries. It happens with anyone. 1 Quote
CADWORKER Posted September 28, 2022 Posted September 28, 2022 On 2/15/2015 at 3:35 PM, Lee Mac said: Welcome to CADTutor Alex Below is a rough draft of a possible program, but the code should hopefully perform as required: (defun c:poly23dpoly ( / enx idx lst pll ptl sel ) (princ "\nSelect points & 2d polylines: ") (if (setq sel (ssget '((0 . "LWPOLYLINE,POINT")))) (progn (repeat (setq idx (sslength sel)) (setq enx (entget (ssname sel (setq idx (1- idx))))) (if (= "POINT" (cdr (assoc 0 enx))) (setq ptl (cons (cdr (assoc 10 enx)) ptl)) (setq pll (cons (mapcar 'cdr (vl-remove-if-not '(lambda ( x ) (= 10 (car x))) enx)) pll)) ) ) (foreach grp pll (foreach vtx grp (if (setq vtx (car (vl-member-if '(lambda ( a ) (equal vtx (list (car a) (cadr a)) 1e-4)) ptl))) (setq lst (cons vtx lst)) ) ) (if (cdr lst) (progn (entmake '((0 . "POLYLINE") (70 . )) (foreach vtx lst (entmake (list '(00 . "VERTEX") '(70 . 32) (cons 10 vtx) ) ) ) (entmake '((0 . "SEQEND"))) ) ) (setq lst nil) ) ) ) (princ) ) Dear Lee Mac, i have been using this lisp , and now when i load it get e message, ; error: extra right paren on input what could be the reason please, Quote
mhupp Posted September 28, 2022 Posted September 28, 2022 you need to add another ) on the end. (defun c:poly23dpoly (/ enx idx lst pll ptl sel) (princ "\nSelect points & 2d polylines: ") (if (setq sel (ssget '((0 . "LWPOLYLINE,POINT")))) (progn (repeat (setq idx (sslength sel)) (setq enx (entget (ssname sel (setq idx (1- idx))))) (if (= "POINT" (cdr (assoc 0 enx))) (setq ptl (cons (cdr (assoc 10 enx)) ptl)) (setq pll (cons (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= 10 (car x))) enx)) pll)) ) ;end repeat ) ;end progn (foreach grp pll (foreach vtx grp (if (setq vtx (car (vl-member-if '(lambda (a) (equal vtx (list (car a) (cadr a)) 1e-4)) ptl))) (setq lst (cons vtx lst)) ) ) ;end foreach (if (cdr lst) (progn (entmake '((0 . "POLYLINE") (70 .)) (foreach vtx lst (entmake (list '(00 . "VERTEX") '(70 . 32) (cons 10 vtx) ) ) ) ;end foreach (entmake '((0 . "SEQEND"))) ) ) ;end progn (setq lst nil) ) ;end if ) ;end foreach ) ;end progn ) ;end if (princ) ) ;end defun Quote
Lee Mac Posted October 5, 2022 Posted October 5, 2022 On 9/28/2022 at 10:33 AM, CADWORKER said: Dear Lee Mac, i have been using this lisp , and now when i load it get e message, ; error: extra right paren on input what could be the reason please, The 'upgrade' to the forum software a few years ago caused every occurrence of "8)" within code blocks to be removed rendering many thousands of code posts unusable; I've now updated my earlier post to reinstate the missing characters. 2 1 Quote
B.N. Posted October 20, 2022 Posted October 20, 2022 Hello, I've tried the lisp, but it creates a 3dpolyline between the given points. for example 4 points makes a 3 segment 3dpoly.... how can i get the interpolated height at every vertex? 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.