This is just a question that is on my mind everytime I use this block; but it is not a show stopper in the least, so I have never thought of asking it.
1. Draw a Rectangle
2. As a new command, Change the layer. I personally always use "CLOUD".
3. Use REVCLOUD to make the rectangle above to a cloud.
Did the cloud change back to the previous layer the rectangle was on? It does for me and has for the past few versions of AutoCAD and on different machines. I usually just remember to change the layer before I create the initial object or after the REVCLOUD is created; but every so often I mix the steps around and this question pops up, "Is there a point to this?"
Anyways, as I stated before this is mostly to statisfy my own curiousity and wondering if there is some reason Autodesk programmed it this way. I believe all or at least most of the other "non-layer" commands do not change the layer and from my knowledge of the DWG database - through simple LISP and .NET programs - it does not keep "past data".
(defun c:rv ()
(command "undo" "begin") ;start undo group
(setq osmd (getvar "osmode"))
(setq echo (getvar "cmdecho"))
(setvar "cmdecho" 0)
(setvar "osmode" 0);turn off snaps
(setq pt1 (getpoint "\nPick Revcloud start point: "))
(setq pt2 (getcorner pt1 "\nPick Revcloud end point: "))
(initget 1 "Yes No")
(setq rsp (getkword "\nInvert Revcloud? [Y/N]:"))
(if (= rsp "Yes") (= rsp "No"))
(command "RECTANG" pt1 pt2)
(setq clay (getvar "clayer"))
(command "_layer" "make" "Revision Cloud" "")
(command "_layer" "color" 1 "Revision Cloud" "")
(command "_layer" "ltype" "continuous" "Outline Heavy" "")
(command "revcloud" "a" 5 5 "" "l" rsp)
(setvar "clayer" clay)
(setvar "osmode" osmd)
(setvar "cmdecho" echo)
(command "undo" "end")
(princ)
)
I have the revcloud on a tool palette, where it's forced to put the revcloud on the layer I set the icon up for regardless of what my current layer is. Works every time.
I use layer-director from lee-mac.com to set layers automatically for many different commands. Works really well, take a look. Not affiliated with lee-mac.
GrantsPirate
Piping and Mech. Designer
Always save a copy of the drawing before trying anything suggested here.
----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.
Thanks for most of the feedback and I did not think that it puts it back on the current layer; but that makes more sense from a programming standpoint.
Thanks also for the tips and tricks of managing layers and this command.