Hi,
I was wondering if anyone has a lisp or vba to convery mtext (no leader) to multileader text (no leader)?
Cheers
TMG
|
Hi,
I was wondering if anyone has a lisp or vba to convery mtext (no leader) to multileader text (no leader)?
Cheers
TMG
Code:(defun c:mt2ml ( / oobj nobj nstrg) (vl-load-com) (setq oobj (vlax-ename->vla-object (car (nentsel "\nSelect source text: ")))) (if (= (vlax-get-property oobj 'ObjectName) "AcDbMText") (setq nstrg (vlax-get-property oobj 'TextString)) (exit) ) (command "_MLEADER") (while (= 1 (logand (getvar "CMDACTIVE") 1)) (command PAUSE)) (setq nobj (vlax-ename->vla-object (entlast))) (if (= (vlax-get-property nobj 'ObjectName) "AcDbMLeader") (vlax-put-property nobj 'TextString nstrg) (exit) ) (entdel (vlax-vla-object->ename oobj)) (princ) )
Perfect!! This is exactly what I needed. Thanks for posting.
It`s a pity, but if the mtext contains field, after convertion to multileader, field becomes a simply text. Is there a possibility to repair this trouble?
Thanks.
If you have a technical question, please find the appropriate forum and ask it there.
You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
jUSt
The MT2ML lisp is great, or was great. This was working fine for a long time and then one day it stopped working. when i run MT2ML, i select Mtext and get this "Select source text: ; error: no function definition: VLAX-ENAME->VLA-OBJECT" Can anyone tell my why this is no longer working?
Thanks,
What version of AutoCAD are you using these days?
As long asis still the second line of the code there shouldn't be any problem.Code:(vl-load-com)
Check out https://forums.autodesk.com/t5/visua...000326#M296098