Quantcast
Channel: Autodesk India Community aggregator
Viewing all articles
Browse latest Browse all 1680

AutoCAD Customization: Visual LISP, AutoLISP and General Customization: Flip Color from bylayer to color and back

$
0
0

I am trying to flip between Bylayer and color 150. If cecolor is bylayer set cecolor to 150 and if cecolor is 150 set cecolor to bylayer. It seems so simple but it's not working.

 

(defun c:22 ()

  (setq cc (getvar "cecolor"))

    (cond 

      ((= cc "Bylayer")  (setvar "cecolor" "150") )

      ((/= cc "Bylayer") (setvar "cecolor" "Bylayer") )

    )

)


Viewing all articles
Browse latest Browse all 1680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>