Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello good afternoon,
I already have a lisp that converts the name of a block to a multileader.
I was wondering if it is possible for him to give the name and in another line the description of the block.
Thank you.
I was wondering if it is possible for him to give the name and in another line the description of the block.
Thank you.
(defun c:BNameLabel (/ ent entl obj)
(cond ((not (setq ent (car (entsel "\nSelect block: ")))))
((not (eq (cdr (assoc 0 (entget ent))) "INSERT")) (princ "\nInvalid object!"))
((setq pt (getpoint "\nSpecify first point: "))
(setq entl (entlast))
(vl-cmdf "_.mleader" "_non" pt "\\")
(while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (vl-cmdf ""))
(if (not (equal entl (setq entl (entlast))))
(vla-put-textstring
(vlax-ename->vla-object entl)
(vlax-get-property
(setq obj (vlax-ename->vla-object ent))
(if (vlax-property-available-p obj 'EffectiveName)
'EffectiveName
'Name
)
)
)
)
)
)
(princ)
)
(vl-load-com)
(princ)
(cond ((not (setq ent (car (entsel "\nSelect block: ")))))
((not (eq (cdr (assoc 0 (entget ent))) "INSERT")) (princ "\nInvalid object!"))
((setq pt (getpoint "\nSpecify first point: "))
(setq entl (entlast))
(vl-cmdf "_.mleader" "_non" pt "\\")
(while (eq (logand 1 (getvar 'CMDACTIVE)) 1) (vl-cmdf ""))
(if (not (equal entl (setq entl (entlast))))
(vla-put-textstring
(vlax-ename->vla-object entl)
(vlax-get-property
(setq obj (vlax-ename->vla-object ent))
(if (vlax-property-available-p obj 'EffectiveName)
'EffectiveName
'Name
)
)
)
)
)
)
(princ)
)
(vl-load-com)
(princ)
Solved! Go to Solution.