i have this following little Code with which i try to convert a text's entity style into "Simplex" (just an example). The text is on the layer "Test". Now, when there is a textfield on the layer "Test", the lisp works perfectly fine, but as soon as there is no textfield it doesn't. this wouldn't be a problem, but since there are some other conversion-codes after this particular one the whole code isn't working..
here is the code:
(defun c:Convert (/ entities len count ent ent_data ent_name new_style_name )
Even with that it wouldn't do the following conversions. I don't know much of errror-handling that is maybe why... Can please somebody tell me what i'm doing wrong?
[b][color=BLACK]([/color][/b]defun c:convert [b][color=FUCHSIA]([/color][/b]/ ss i en ed[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]if [b][color=NAVY]([/color][/b]setq ss [b][color=MAROON]([/color][/b]ssget [color=#2f4f4f]"X"[/color] '[b][color=GREEN]([/color][/b][b][color=BLUE]([/color][/b]0 . [color=#2f4f4f]"*TEXT"[/color][b][color=BLUE])[/color][/b][b][color=BLUE]([/color][/b]8 . [color=#2f4f4f]"TEST"[/color][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]progn [b][color=MAROON]([/color][/b]setq i 0[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]while [b][color=GREEN]([/color][/b]setq en [b][color=BLUE]([/color][/b]ssname ss i[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]setq ed [b][color=BLUE]([/color][/b]entget en[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]entmod [b][color=BLUE]([/color][/b]subst [b][color=RED]([/color][/b]cons 7 [color=#2f4f4f]"SIMPLEX"[/color][b][color=RED])[/color][/b] [b][color=RED]([/color][/b]assoc 7 ed[b][color=RED])[/color][/b] ed[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b] [b][color=GREEN]([/color][/b]setq i [b][color=BLUE]([/color][/b]1+ i[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]prin1[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b]