TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: w64bit on July 31, 2022, 06:58:59 AM
-
I noticed that if I use in a script file:
(if (setq clr1 (ssget "X" (list '(-4 . "&=") '(62 . 250) (cons 410 "Model")))) (command "CHPROP" clr1 "" "C" 251 ""))
(if (setq clr2 (ssget "X" (list '(-4 . "&=") '(62 . 254) (cons 410 "Model")))) (command "CHPROP" clr2 "" "C" 253 ""))
The last line is changing the color to 251 instead 253. Why?
If I switch the lines, all it's OK.
-
DXF group 62 is not bit-coded and so you shouldn't use the bitwise operator in the ssget filter list - try:
(if (setq clr1
(ssget "X" '
((62 .
250) (410 .
"Model")))) (command "_.CHPROP" clr1
"" "_C" 251 "")) (if (setq clr2
(ssget "X" '
((62 .
254) (410 .
"Model")))) (command "_.CHPROP" clr2
"" "_C" 253 ""))
-
Thank you very much.