guitarguy1685 Posted January 27, 2010 Posted January 27, 2010 when I extrude an object it will change the object from it's current layer to what my CLAYER is. Is there a setting to keep the layer the same? Quote
viviancarvalho Posted January 27, 2010 Posted January 27, 2010 A simple solution could be keeping the CLAYER same as that of the objects current layer Quote
BearDyugin Posted January 27, 2010 Posted January 27, 2010 Once for a long time has confronted with the same problem, and has written the program, it transfers new object on its old layer and old color (defun c:geo_extrude (/ nabor dlina i oldcolor sloy ima cvet 3Dob c b) (setq nabor (SSGET ":L" '((0 . "LWpolyline,circle"))) dlina (SSLENGTH nabor) i -1 oldcolor (getvar "CECOLOR") b (getreal "Height of extruding") ) (setvar "CECOLOR" "1");appoint any colour, that only not "BYLAYER" (REPEAT dlina ;(REPEAT (SETQ sloy (ASSOC 8 (SETQ ima (ENTGET (SSNAME nabor (SETQ i (1+ i))))) ) cvet (if (ASSOC 62 ima) (ASSOC 62 ima) '(62 . 256) ) ) (if (= (cdr (ASSOC 0 ima)) "CIRCLE") (setq c 0) (extrude-y-n ima) ) (if (= c 0) ;(if (progn ;(progn (VL-CMDF "_extrude" (CDR (ASSOC -1 ima)) "" b) (SETQ 3Dob (ENTGET (entlast)) 3Dob (SUBST sloy (ASSOC 8 3Dob) 3Dob) 3Dob (SUBST cvet (ASSOC 62 3Dob) 3Dob) ) (entmod 3Dob) ) ;)progn ) ;)if ) ;)REPEAT (setvar "CECOLOR" oldcolor) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun extrude-y-n (ima / spisversh dlina a b) (setq spisversh (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) ima) ) dlina (1- (length spisversh)) a -1 c 0 ) (if (or (= (cdr (assoc 70 ima)) 1) ;(if1 (equal (nth 0 spisversh) (nth dlina spisversh)) ) (progn ;(progn (repeat dlina ;(repeat1 (setq a (1+ a) b -1 ) (repeat dlina ;(repeat2 (setq b (1+ b)) (if ;(if2 (and (> (abs (- a b)) 1) (or (/= a 0) (/= b (1- dlina))) (or (/= b 0) (/= a (1- dlina))) ) (if ;(if3 (inters (nth a spisversh) (nth (1+ a) spisversh) (nth b spisversh) (nth (1+ b) spisversh) ) (setq c 1) ) ;)if3 ) ;)if2 ) ;)repeat2 ) ;)repeat1 ) ;)progn (setq c 1) ) ;)if1 ) Quote
guitarguy1685 Posted January 28, 2010 Author Posted January 28, 2010 awesome lisp. you may want to change b (getreal "Height of extruding") to b (dist "\nHeight of extruding: ") so you can either enter a number or using your mouse Quote
BearDyugin Posted January 29, 2010 Posted January 29, 2010 awesome lisp. you may want to change b (getreal "Height of extruding") to b (dist "\nHeight of extruding: ") so you can either enter a number or using your mouse You are absolutely right But this line was not in my code, I extruding always on one constant, this line I have written already here for you Quote
BearDyugin Posted January 29, 2010 Posted January 29, 2010 Not at all! But I see you have knowledge in Lisp, could to write the similar itself also... Or you hoped that there is any system variable or a tick responsible for it Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.