thanhdattdk Posted April 11, 2017 Posted April 11, 2017 hello everbody, i want to Define coordinates point by code lisp but error (lselsetp or lentityp). I try to it but fail. hopy everboy help me.Thank everybody read my Thread ;============================================================================================= (defun LM:IntersectionsinSet ( ss / a b i j l ) (setq i (sslength ss)) (while (not (minusp (setq j (1- i) i (1- i)))) (setq a (vlax-ename->vla-object (ssname ss i))) (while (not (minusp (setq j (1- j)))) (setq b (vlax-ename->vla-object (ssname ss j)) l (cons (LM:GroupByNum (vlax-invoke a 'IntersectWith b acExtendNone) 3) l) ) ) ) (apply 'append l) ) (defun LM:GroupByNum ( l n / r) (if l (cons (reverse (repeat n (setq r (cons (car l) r) l (cdr l)) r)) (LM:GroupByNum l n) ) ) ) ;============================================================================================= (defun c:td (/ qa i) (command "_.STYLE" "VNI" "VN_VNI.SHX" "0.0" "1" "0" "" "" "") (setq qa (ssget)) (setq qa1 (ssget)) (setq k 0) (while (setq e (ssname qa1 k)) (setq qa (ssadd e qa)) (setq k (1+ k)) ) [b][u](setq lst (LM:IntersectionsinSet qa)) (foreach item lst (setq laynd (entget item)) (setq ndd (cdr (assoc 10 laynd))) (setq XCOC (car ndd)) (command "_.TEXT" "S" "VNI" "MR" item "1.8" "90" (rtos XCOC 2 0)) )[/u][/b] (princ)) Quote
Roy_043 Posted April 11, 2017 Posted April 11, 2017 Change: (foreach item lst (setq laynd (entget item)) (setq ndd (cdr (assoc 10 laynd))) (setq XCOC (car ndd)) To: (foreach item lst (setq XCOC (car item)) 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.