Jump to content

Recommended Posts

Posted

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

Untitled.jpg

;=============================================================================================
(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))

Posted

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))

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...