Afternoon everyone,
I have been struggling with a simple task and am wondering why the IF statement doesn't need a PROGN when used in the ENTMOD function.
Here's an example:
(entmod
[color=green](if (assoc 8 (setq eList (entget ent)))[/color] ; testexpr
[color=purple](subst (cons 8 "Text") (assoc 8 eList) eList)[/color] ; thenexpr
[color=blue](append eList '((8 . "Text")))[/color] ; elseexpr
)
) ; _entmod
According to the help file,
IF
Conditionally evaluates expressions
(if testexpr thenexpr [elseexpr])
So how does this end up running both scenarios, ... or does it?