TheRobster Posted January 22, 2006 Share Posted January 22, 2006 Hi, I am working on the design of a surface water drainage system for a commercial development and have been given plans of the site that were generated using the Key Terra Firma software. The problem I am having is that much of the drawing has x, y and z coordinate data (length, width and depth) but I am really only interested in working out the surface areas of various parts of the development. Basically I don't need the z (depth) data and would like to remove it and only leave the x and y coordinates behind (but without affecting the layout at all). Is there anyway to do this? Ideally there would be an option where I just select the whole drawing and click a button labelled "remove all z data" which just resets all z values to zero. How can I do this? Cheers -Rob Quote Link to comment Share on other sites More sharing options...
CarlB Posted January 22, 2006 Share Posted January 22, 2006 This has been discussed many times, most recently yesterday. See the post by bpjewell 1/21/06. Let us know how it goes. Quote Link to comment Share on other sites More sharing options...
TheRobster Posted January 22, 2006 Author Share Posted January 22, 2006 Ah, got it. I actually did a search of the forum but neglected to just look down the list of current topics (didn't think I'd be that lucky to have a similar post so recently....) Quote Link to comment Share on other sites More sharing options...
webster Posted May 12, 2009 Share Posted May 12, 2009 Ah, got it. I actually did a search of the forum but neglected to just look down the list of current topics (didn't think I'd be that lucky to have a similar post so recently....) I have done a search and have found nothing. Could somebody show me how to do this? I basically just want to flatten the dwg I see for presentation purposes only. Quote Link to comment Share on other sites More sharing options...
The Buzzard Posted May 12, 2009 Share Posted May 12, 2009 From the properties dialog, could you not 0 out the Z there. Quote Link to comment Share on other sites More sharing options...
webster Posted May 12, 2009 Share Posted May 12, 2009 From the properties dialog, could you not 0 out the Z there. It doesnt let me do that it is greyed out and I cannot edit the x.y or z attributes for the properties box. Quote Link to comment Share on other sites More sharing options...
The Buzzard Posted May 12, 2009 Share Posted May 12, 2009 I am sorry, I did not fully understand what you were trying to do. I will keep looking into this and see what I can find for you. Quote Link to comment Share on other sites More sharing options...
The Buzzard Posted May 12, 2009 Share Posted May 12, 2009 I believe where a block is concerned, To this you will need a lisp program. Quote Link to comment Share on other sites More sharing options...
webster Posted May 12, 2009 Share Posted May 12, 2009 I have a drawing that I would like to import into another application, but because the dwg has a 'depth' it does not import correctly. I would like to remove all attributes of depth (z) and keep what I see on the screen as a 2 dimensional image. Quote Link to comment Share on other sites More sharing options...
The Buzzard Posted May 12, 2009 Share Posted May 12, 2009 There is a program on this thread on post 9. Check it out. http://www.cadtutor.net/forum/showthread.php?t=2711&highlight=Flatten+attributes Quote Link to comment Share on other sites More sharing options...
The Buzzard Posted May 12, 2009 Share Posted May 12, 2009 Here is another. http://www.cadtutor.net/forum/showthread.php?t=2213&highlight=Flatten+attributes Quote Link to comment Share on other sites More sharing options...
webster Posted May 12, 2009 Share Posted May 12, 2009 Flatten Command doesnt do anything for me. The response I get is "Unknown command "FLATTEN". Press F1 for help." Quote Link to comment Share on other sites More sharing options...
The Buzzard Posted May 12, 2009 Share Posted May 12, 2009 Sorry I Tried To Help NOT SURE, BUT LEARN LISP. Quote Link to comment Share on other sites More sharing options...
eldon Posted May 12, 2009 Share Posted May 12, 2009 I think that LT does not have Lisp, so you will have to do it manually. First of all , make a copy of your drawing and practise on the copy. Then start the Move command, select ALL, then the base point is picked anywhere in the drawing, and the displacement is @0,0,1e99. You have not finished yet - there is more. Now repeat the Move, select ALL, and the base point is picked anywhere, and the displacement this time is @0,0,-1e99. If there are any 3D blocks, then they will not be flattened, otherwise everything will have a z value of 0, and all done without Lisp Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 12, 2009 Share Posted May 12, 2009 Nice tip Eldon, -- I was about to recommend the flatten LISP in our Archive here - but LT is sooo annoying... Quote Link to comment Share on other sites More sharing options...
webster Posted May 13, 2009 Share Posted May 13, 2009 I think that LT does not have Lisp, so you will have to do it manually. First of all , make a copy of your drawing and practise on the copy. Then start the Move command, select ALL, then the base point is picked anywhere in the drawing, and the displacement is @0,0,1e99. You have not finished yet - there is more. Now repeat the Move, select ALL, and the base point is picked anywhere, and the displacement this time is @0,0,-1e99. If there are any 3D blocks, then they will not be flattened, otherwise everything will have a z value of 0, and all done without Lisp I tried this and the end result was a bunch of dots all over the screen and no real image. Thanks anyway, Ive traced the image and just used that. Quote Link to comment Share on other sites More sharing options...
eldon Posted May 13, 2009 Share Posted May 13, 2009 I tried this and the end result was a bunch of dots all over the screen and no real image. I wonder what was in the drawing Could you post a snippet of the drawing so that I could find out what is going on? Quote Link to comment Share on other sites More sharing options...
Fish103 Posted May 19, 2009 Share Posted May 19, 2009 Here's a lisp routine I wrote many years ago that sets all the selected items Z to 0 Hope it helps. ; sets all entities to 0.0 on the z axis (defun c:fixz (/ ed mysel total count cur_ent curtype as1 as2 ptx1 ptx2 pty1 pty2 ptz1 ptz2 oldpt newpt ) (setq mysel (ssget)) (setq total (sslength mysel)) (setq count 0) (while ( (setq cur_ent (ssname mysel count)) (setq ed (entget cur_ent)) (setq curtype (cdr (assoc '0 ed))) (if (= curtype "LINE") (progn (setq as1 (assoc '10 ed)) (setq as2 (assoc '11 ed)) (setq ptx1 (cadr as1)) (setq ptx2 (cadr as2)) (setq pty1 (caddr as1)) (setq pty2 (caddr as2)) (setq ptz1 (cadddr as1)) (setq ptz2 (cadddr as2)) (setq oldpt (list '10 ptx1 pty1 ptz1)) (setq newpt (list '10 ptx1 pty1 '0.0)) (setq ed (subst newpt oldpt ed)) (entmod ed) (setq oldpt (list '11 ptx2 pty2 ptz2)) (setq newpt (list '11 ptx2 pty2 '0.0)) (setq ed (subst newpt oldpt ed)) (entmod ed) ) ) (if (or (= curtype "MTEXT") (= curtype "TEXT")) (progn (setq as1 (assoc '10 ed)) (setq ptx1 (cadr as1)) (setq pty1 (caddr as1)) (setq ptz1 (cadddr as1)) (setq oldpt (list '10 ptx1 pty1 ptz1)) (setq newpt (list '10 ptx1 pty1 '0.0)) (setq ed (subst newpt oldpt ed)) (entmod ed) ) ) (if (or (= curtype "ARC") (= curtype "CIRCLE") (= curtype "ELLIPSE")) (progn (setq as1 (assoc '10 ed)) (setq ptx1 (cadr as1)) (setq pty1 (caddr as1)) (setq ptz1 (cadddr as1)) (setq oldpt (list '10 ptx1 pty1 ptz1)) (setq newpt (list '10 ptx1 pty1 '0.0)) (setq ed (subst newpt oldpt ed)) (entmod ed) ) ) (if (= curtype "DIMENSION") (progn (setq as1 (assoc '13 ed)) (setq as2 (assoc '14 ed)) (setq ptx1 (cadr as1)) (setq ptx2 (cadr as2)) (setq pty1 (caddr as1)) (setq pty2 (caddr as2)) (setq ptz1 (cadddr as1)) (setq ptz2 (cadddr as2)) (setq oldpt (list '13 ptx1 pty1 ptz1)) (setq newpt (list '13 ptx1 pty1 '0.0)) (setq ed (subst newpt oldpt ed)) (entmod ed) (setq oldpt (list '14 ptx2 pty2 ptz2)) (setq newpt (list '14 ptx2 pty2 '0.0)) (setq ed (subst newpt oldpt ed)) (entmod ed) ) ) (if (= curtype "POLYLINE") (progn (setq as1 (assoc '10 ed)) (setq ptx1 (cadr as1)) (setq pty1 (caddr as1)) (setq ptz1 (cadddr as1)) (setq oldpt (list '10 ptx1 pty1 ptz1)) (setq newpt (list '10 ptx1 pty1 '0.0)) (setq ed (subst newpt oldpt ed)) (entmod ed) ) ) (if (or (= curtype "LEADER") (= curtype "SPLINE")) (progn (setq as1 (assoc '10 ed)) (setq ptx1 (cadr as1)) (setq pty1 (caddr as1)) (setq ptz1 (cadddr as1)) (setq oldpt (list '10 ptx1 pty1 ptz1)) (setq newpt (list '10 ptx1 pty1 '0.0)) (setq ed (subst newpt oldpt ed)) (entmod ed) ) ) (setq count (1+ count)) ) ) Quote Link to comment Share on other sites More sharing options...
steepcreeker Posted December 16, 2015 Share Posted December 16, 2015 First of all , make a copy of your drawing and practise on the copy. Then start the Move command, select ALL, then the base point is picked anywhere in the drawing, and the displacement is @0,0,1e99. You have not finished yet - there is more. Now repeat the Move, select ALL, and the base point is picked anywhere, and the displacement this time is @0,0,-1e99. If there are any 3D blocks, then they will not be flattened, otherwise everything will have a z value of 0, and all done without Lisp Best tip in a long time. Great help. Quote Link to comment Share on other sites More sharing options...
RobDraw Posted December 16, 2015 Share Posted December 16, 2015 Actually, it was a great tip a long time ago. Quote Link to comment Share on other sites More sharing options...
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.