crescent Posted December 17, 2010 Posted December 17, 2010 Hi, I have a found a few post regarding that sam issue, one seems to change direction half way though the post and the other has a lsp routine that don't seems to select objects. We basically create lots of files to insert into a drawing which can then be used to create 3D visuals. I insert from a external file a bookshelf type unit which i made up from a side elevation of polylines, to which i then explode last then extrude previous and select the path of extrusion. The problem is it all works fine untill i get my final objects. I great the original polylines in the layers i want but they then change to my CLAYER. Anyone have a somple way of keeping the original layers, bearing in mind that there may be more than one layer in each external file. Thanks in advance. Quote
ReMark Posted December 17, 2010 Posted December 17, 2010 Why aren't you doing your extruding on the original layer? Quote
crescent Posted December 17, 2010 Author Posted December 17, 2010 I'm trying to make the process a quick as possible... If you can imagine a kitchen type base unit with open shelving. I have a back and 2 shelves with hi impact edging. The end cheeks are done as a block seperately so there is no peoplem there. But the extrusion is between both end cheeks. The original layer for example is vis_disp on the back and shelves but vis_disp_e on the hi impact edging. The reasoning is that they may require difference materials attaching when creating a 3d visual. Quote
ReMark Posted December 17, 2010 Posted December 17, 2010 And you attach your materials by layer right? Quote
crescent Posted December 17, 2010 Author Posted December 17, 2010 Correct, but not just in CAD, in studio max too. Quote
ReMark Posted December 17, 2010 Posted December 17, 2010 What is this lisp routine you refer to in your first post? What is it supposed to do? Quote
crescent Posted December 17, 2010 Author Posted December 17, 2010 http://www.cadtutor.net/forum/showthread.php?44225-Extrude-and-layers&highlight=layer+extrude Quote
crescent Posted December 17, 2010 Author Posted December 17, 2010 Not sure what it does though?? Quote
crescent Posted December 17, 2010 Author Posted December 17, 2010 (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
crescent Posted December 17, 2010 Author Posted December 17, 2010 There is a post called "extrude and layers" Quote
ReMark Posted December 17, 2010 Posted December 17, 2010 There is a post called "extrude and layers" I'll take a look at it momentarily. I'll be back. Quote
rkent Posted December 18, 2010 Posted December 18, 2010 (edited) In 2011 in options, 3d, there is a place to decide how to handle this. 3D modeling, 3d objects, deletion control. See also DELOBJ in help. Edited December 18, 2010 by rkent added words Quote
CADMAN56 Posted January 19, 2011 Posted January 19, 2011 Support request sent to autocad follows..................they sent me here. Older versions of autocad always kept the original layer of the object when extruding. This is the only logical course of action.... If you have complex assemblies with many parts already identified in a plan by their layers and you are building and extruding off that plan; what sense does it make to change to the current layer... Are you sure there isn't a system variable for this??? If not ,,,,i suggest you contact the programmers and put things back the way they were. Please research this and get back to me..........i would hate to have to draw in an old environment just to get things to work properly. That would be counter productive in too many ways. Quote
ReMark Posted January 19, 2011 Posted January 19, 2011 You would like us to "research this and get back to you"? What, you're too busy to research it yourself? Why should we contact the programmers at AutoDesk? We aren't hired help; we're volunteers. Quote
ReMark Posted January 19, 2011 Posted January 19, 2011 In 2011 in options, 3d, there is a place to decide how to handle this. 3D modeling, 3d objects, deletion control. See also DELOBJ in help. DELOBJ Controls whether geometry used to create 3D objects is retained or deleted. Wasn't the OP more interested in keeping the original layer of the object being extruded (as is CADMAN56) as opposed to the original geometry? Quote
CADMAN56 Posted January 19, 2011 Posted January 19, 2011 support request sent to autocad follows..................they sent me here.Older versions of autocad always kept the original layer of the object when extruding. This is the only logical course of action.... If you have complex assemblies with many parts already identified in a plan by their layers and you are building and extruding off that plan; what sense does it make to change to the current layer... Are you sure there isn't a system variable for this??? If not ,,,,i suggest you contact the programmers and put things back the way they were. Please research this and get back to me..........i would hate to have to draw in an old environment just to get things to work properly. That would be counter productive in too many ways. i just got reamed in an email by someone who can't read,,,,saying " why am i asking the forum to research?" in my first line it says " support request (that i) sent to autocad" asking them to research this... In autocad 2005, when you extruded ,the layer remained the same. Quote
ReMark Posted January 19, 2011 Posted January 19, 2011 Your post is somewhat confusing. I got the same impression. I'm going to check out what you said about 2005 so you'll have to give me a couple of minutes. Quote
CADMAN56 Posted January 19, 2011 Posted January 19, 2011 So,,,,,this lsp program mentioned in this thread..............do i copy this into and at the end of the "autocad2011doc.lsp"? Can anyone tell me how to get it to work....i tried making it its own file and naming it "extrudelayer.lsp" and then tried loading it thru appload, but can't get it to work. I'm not familiar at all with programming.... Thanks Quote
ReMark Posted January 19, 2011 Posted January 19, 2011 I checked out your claim using AutoCAD 2004. Unfortunately, it did not prove to be true. Quote
ReMark Posted January 19, 2011 Posted January 19, 2011 So,,,,,this lsp program mentioned in this thread..............do i copy this into and at the end of the "autocad2011doc.lsp"?Can anyone tell me how to get it to work....i tried making it its own file and naming it "extrudelayer.lsp" and then tried loading it thru appload, but can't get it to work. I'm not familiar at all with programming.... Thanks No, you do not HAVE to add it to any other file. The lisp routine can be loaded as you said via the Appload command. To run the routine type geo_extrude at the command line and follow the prompts. As far as I can tell the routine does what it says and what you want it to. 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.