Code: Select all
(defun c:tb ()
(setq obj (vlax-ename->vla-object (car (entsel "Pick text")))) (setq str (vlax-get obj 'textstring)) (setq x 0) (repeat (strlen str) (setq char (substr str (setq x (+ x 1)) 1 )) (cond ((= char "a" )(setq bname "Blocka" wid 1.12)) ((= char "b" )(setq bname "Blockb" wid 1.0)) ((= char "c" )(setq bname "Blockc" wid 0.85)) ((alert (strcat "Character not supported " char))) ) (princ (strcat "\n" bname " " char)) )
)
error: application is locked and cannot be unloaded.
I've never seen that error before!
I make 3 blocks named Blocka, Blockb & Blockc of polyline letters a,b, & c for testing, I have a text string: "abc", when I run it, its supposed to insert the 3 blocks and look like new text.
Any ides why the error?
Thanks!