motee-z Posted March 4, 2009 Posted March 4, 2009 Hello freinds how can i draw spline from a list say i have a list (setq mylist(append list1 list2)) (command "_spline") (foreach pt mylist (comand pt) ) (command "") (command"") (command"") i saw this way from working lisp but here not working any help will be appreciated thanks Quote
Lee Mac Posted March 4, 2009 Posted March 4, 2009 Hello freinds how can i draw spline from a list say i have a list (setq mylist(append list1 list2)) (command "_spline") (foreach pt mylist (command pt) ) (command "") (command"") (command"") i saw this way from working lisp but here not working any help will be appreciated thanks Could this be your problem? Quote
motee-z Posted March 4, 2009 Author Posted March 4, 2009 this is my lisp to draw spline and asking for z value i got the list of points i picked but spline not drawen ;;;;;;;;;; (defun c:3dsp (/) (setq allpt '()) (while (setq a (getpoint "\n Pick Point: ")) (setq osmd(getvar"osmode")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;; (initget 1) (setq pt11 (entget (car (entsel "\nSelect Text level: ")))) (setq txtstr1 (assoc 1 pt11)) (setq dlv1 (atof(cdr txtstr1))) (princ dlv1) (setq pts(list(car a)(cadr a)dlv1)) (setq allpt(append pts allpt)) (setvar "osmode"0) ) (command "_spline") (foreach pont allpt (command pont) ) (command "") (command "") (command "") (setvar"osmode"osmd) (princ) ) Quote
Lee Mac Posted March 4, 2009 Posted March 4, 2009 Perhaps: (defun c:3dsp (/ vLst oVar pt txt txtl allpt) (setq vLst '("CMDECHO" "OSMODE") oVar (mapcar 'getvar vLst)) (while (and (setq pt (getpoint "\nPick Point: ")) (setq txt (car (entsel "\nSelect Text level: ")))) (setq txtl (atof (cdr (assoc 1 (entget txt))))) (princ txtl) (setq pt (subst txtl (last pt) pt) allpt (cons pt allpt))) (mapcar 'setvar vLst '(0 0)) (setq allpt (append (reverse allpt) '("" "" ""))) (command "_spline") (mapcar 'command allpt) (mapcar 'setvar vLst oVar) (princ)) Quote
motee-z Posted March 5, 2009 Author Posted March 5, 2009 thank you lee mack realy you are a good man 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.