Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is my first post so please bear with me.
Our senior tech made a lisp that sets a multileader style and annotation layer current, then the user selects an object in an xref which populates the multileader text with that object layer. We then use search and replace to edit the text. I would like to remove the search&replace step by modifying the lisp to read and the Layer Description instead of the layer. The senior tech is out of the office for some time and he's the resident LISP programming expert.
Please help me figure out how to change this from reading the LAYER and instead read the Layers' DESCRIPTION. Thank you!
(defun cmdoff()(setvar "cmdecho" 0)(princ)) (defun cmdon()(setvar "cmdecho" 1)(princ)) (defun c:TMK ( / oldosm entn entl ent8 sctr ent8l pstr stp1 stp2) (princ "TRAFFIC MARKING KEY MULTILEADER") (cmdoff) (setq oldosm (getvar "osmode")) (setq oldmsty (getvar "cmleaderstyle")) (setvar "clayer" "C-ANNO-TEXT") (setvar "osmode" 513) (setvar "cmleaderstyle" "TMK") (setq entn (car (nentsel ))) (if entn (progn (setq entl (cdr (entget entn))) (setq ent8 (cdr (assoc 8 entl))) ; (setq sctr 2 ent8l (strlen ent8)) (while (<= sctr ent8l ) (setq pstr (substr ent8 sctr 1 )) (if (= pstr "|" ) (progn (setq stp1 (substr ent8 1 (- sctr 1 ))) (setq stp2 (substr ent8 (+ 1 sctr ) ent8l )) ) ) (setq sctr (+ 1 sctr)) ) ; (command "mleader" pause pause stp2 "") ) (setvar "osmode" oldosm) ;(setvar "cmleaderstyle" oldmsty) )(cmdon) (princ) )
Solved! Go to Solution.