TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: delkov on October 12, 2015, 07:21:19 AM
-
Hi to all.
My trouble is that I want to make invisible some object (e.g spline), but with opportunity to click on it by mouse to change it and etc.
My solution is like this
(vla-put-entitytransparency obj LEVEL)
But max value of "LEVEL" is only 90..
How can I get around it?
Or there are another ways?
Thanks.
-
Set the object colour to an RGB colour equal to the drawing background colour?
-
Good idea, but I'll use a varicolored backing PDF :(
-
You can set the transparency higher than 90 by lisp.
(defun c:test ( / ss n i)
(if
(and
(setq ss (ssget ":L"))
(progn
(while
(and
(setq n (getint "\nTransparency [0-99]: "))
(not (<= 0 n 99))
)
(princ "\nInvalid value. Try again.")
)
n
)
(setq n (list (cons 440 (+ (lsh 2 24) (fix (- 255 (* n 2.55)))))))
)
(repeat (setq i (sslength ss))
(entmod
(append
(entget (ssname ss (setq i (1- i))))
n
)
)
)
)
(princ)
)
-
It perfectly works!
Thanks, man.
-
It perfectly works!
Thanks, man.
You're welcome!