Sorry for being Noob here.
im learning basic LISP and it works well on me 🙂
But while im working on adding tag/label on trench OSP Routing drawing the "quick propeties" sudenlly pop up with exact qty of the polyline i selected and idea comes up on my mind, if i can make lisp the same with "quick properties" with output of text/mtext or leader .
is that posible?
i start making on idea of "tlen.lisp" it also generate result with qty of polyline selected with total measurement but i can't make it on txt/mtxt or leader 😞
guys help me.
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
For the next time, post the code you have started to write...
As a demo:
(vl-load-com) (defun c:demo (/ ent i lst n osm pt pt1 ss str) (setq osm (getvar 'OSMODE)) (if (and (setq ss (ssget '((0 . "LWPOLYLINE")))) (setvar 'osmode 512) (setq pt (getpoint "\nSpecify leader insertion point: ")) (setvar 'osmode 0) (setq pt1 (getpoint pt "\nSpecify text insertion point: ")) ) (progn (repeat (setq i (sslength ss)) (setq ent (entget (ssname ss (setq i (1- i))))) (if (not (setq lt (cdr (assoc 6 ent)))) (setq lt (cdr (assoc 6 (tblsearch "LAYER" (cdr (assoc 8 ent)))))) ) (if (and lst (setq n (cadr (assoc lt lst))) ) (setq lst (subst (list lt (1+ n)) (assoc lt lst) lst)) (setq lst (cons (list lt 1) lst)) ) (setq str "") (foreach x lst (setq str (strcat str (car x) " - " (itoa (cadr x)) "\\P")) ) ) (command "_.leader" pt pt1 "" (vl-string-right-trim "\\P" str) "") ) ) (setvar 'osmode osm) (princ) )
Hope that helps
Henrique