This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

transferring multi-texts from cad to excel sequentially

2 posts · 5042 views

PLZ,
I need to edit to that lisp code for extracting texts values itself with their coordinates;
because that lisp extracts only the coordinates (E,N) of positions of texts without texts ...

(defun c:pall()
	(setq fa (getstring "nFile Name : > "))
	(setq fff (open fa "a"))
        (prompt "nSelect Points = ")
	(setq group (ssget ))
	(setq ssl (sslength group))
	(setq count 0)
	   (while (< count ssl)
		(setq snam (ssname group count))
		(setq xcx (entget snam))
		(SETQ VVV1 (ASSOC '10 XCX))
		(setq xp (cadr vvv1))
		(setq yp (caddr vvv1))
		(setq zp (cadddr vvv1))
                (setq sss (strcat (rtos xp 2 3) "," (rtos yp 2 3) "," (rtos zp 2 3)))
                (write-line sss fff)
                (setq count (1+ count))
	  )
(close fff)
)

(princ)

Last edited by nuntius on , edited 1 time in total. Reason: added [code] tags