- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi i need some help ~
i found this code .
but there is error.
that code is extrude with text.
there is polyline , and text in polyline.
if i select polyline , i would like to extrude obj as txt value .
(defun c:txtb (/ ss i sn pts n s in psn)
;
(if (setq ss (ssget '((0 . "*POLYLINE"))))
(repeat (setq i (sslength ss))
(setq sn (ssname ss (setq i (1- i))))
(if (and (vlax-curve-isclosed sn)
(eq (- (fix (vlax-curve-getendparam sn)) (fix (vlax-curve-getstartparam sn))) 4)
)
(progn
(foreach x (entget sn)
(if (eq (car x) 10)
(setq pts (cons (list (cadr x) (caddr x)) pts))
)
)
( if (setq s ( ssget "_WP" pts '((0 . "text")) ) )
(progn
(setq en (ssname s 0))
(setq elist (entget en))
(setq txt (cdr (assoc 1 elist)))
(setq sum (atof txt) )
(command "extrude" en "" sum "" )
)
)
)
)
)
)
)
(princ)
Solved! Go to Solution.