Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't entmod two text assoc.

2 REPLIES 2
Reply
Message 1 of 3
MarcelGosselin
202 Views, 2 Replies

Can't entmod two text assoc.

The following code only entmods the which ever is last. How do I combine so both work>

Thank you

(if (= nil new) (setq new old))
(progn

(entmod (subst (cons 40 10.0) (cons 40 oldHT) elist))
(entmod (subst (cons 50 new) (cons 50 old) elist))
)
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: MarcelGosselin

Marcel - (if (= nil new) (setq new old)) (progn (entmod (setq elist (subst (cons 40 10.0) (cons 40 oldHT) elist))) (entmod (subst (cons 50 new) (cons 50 old) elist))) - the both entmods use the same list with the current substitution. For clarity and speed you may want to make all the necessary substitions to the data list first then use a single entmod:

(setq elist (subst (cons 40 10.0) (cons 40 oldHT) elist)
elist (subst (cons 50 new) (cons 50 old) elist)
)

(entmod elist)


Peter
Message 3 of 3

Thank you Peter, worked great, sorry just couldn't see the light. Thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost