multiline text to multileader conversion
Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=6517
Printed Date: 16.May.2026 at 08:22
Topic: multiline text to multileader conversion
Posted By: Betinka
Subject: multiline text to multileader conversion
Date Posted: 01.Sep.2011 at 08:47
Hi, I'm trying to find routine that will change my MTEXT to MLEADER. I have found sth common on autodesk discussion group:
; MTXT.LSP Match Text updated to use mleaders
;; Match Text, pick text with desired text value, then
;; pick text to be changed.
;=========================================================
(defun C:MTXT ( / edata edata1 etype etype1 EL CVALUE EN BN)
(setq EL (entget (car (nentsel "\nPick Text (From)...")))
etype (cdr (assoc 0 EL)))
(setq EN (car (nentsel "\nPick Text (To)....."))
edata1 (entget EN)
etype1 (cdr (assoc 0 edata1)))
(cond ((and (= etype "MULTILEADER") (= etype1 "MULTILEADER")) (setq CVALUE (cdr (assoc 304 EL))
BN (entget EN)
BN (subst (cons 304 CVALUE) (assoc 304 BN) BN));setq
(entmod BN)
(entupd EN))
((and (= etype "MULTILEADER") (or (= etype1 "TEXT") (= etype1 "MTEXT"))) (setq CVALUE (cdr (assoc 304 EL))
BN (entget EN)
BN (subst (cons 1 CVALUE) (assoc 1 BN) BN));setq
(entmod BN)
(entupd EN))
((and (or (= etype "TEXT") (= etype "MTEXT")) (= etype1 "MULTILEADER")) (setq CVALUE (cdr (assoc 1 EL))
BN (entget EN)
BN (subst (cons 304 CVALUE) (assoc 304 BN) BN));setq
(entmod BN)
(entupd EN))
((and (or (= etype "TEXT") (= etype "MTEXT")) (or (= etype1 "TEXT") (= etype1 "MTEXT"))) (setq CVALUE (cdr (assoc 1 EL))
BN (entget EN)
BN (subst (cons 1 CVALUE) (assoc 1 BN) BN));setq
(entmod BN)
(entupd EN))
);cond
)
|
What this routine do is: 1. you have to select MTEXT to collect text 2 you have to select MLEADER to paste text. and that's it
But what I really want is that after selecting MTEXT leader line will immediadetly "grow" from the MTEXT and I will just have to place leader line in proper position. So I want to substitute MTEXT with MLEADER "in place".
Does anybody can help?
------------- ACAD 2012 full English
Poland, Warsaw
|
|