Print Page | Close Window

Objects have different Z coordinates

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DXF formats, Design Review, AutoCAD web, Drive, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5872
Printed Date: 06.Sep.2026 at 01:37


Topic: Objects have different Z coordinates
Posted By: bertrand
Subject: Objects have different Z coordinates
Date Posted: 12.May.2011 at 08:39
I am working on a Cad file, the map of a city. The lines, polylines, hatch, splines, blocks, text, they all have different Z coordiantes.
 
To bring them all to level zero, I tried the following:
- Flatten objects
- Move objects to 0,0,1e99 and then 0,0,-1e99
 
Neither worked. I also tried selecting everything and changing property to set Z coordinate to 0, but it's apparently not possible as they are different object types!
 
If anyone has tried and solved this problem, please help me! Ouch



Replies:
Posted By: dabrovsky
Date Posted: 12.May.2011 at 09:55

I hade some time ago lisp file which could bring all objects to z=0

I wil try find it for you


Posted By: dabrovsky
Date Posted: 12.May.2011 at 10:01

I have got one:

http://www.cadcorner.ca/lisp.php" rel="nofollow - http://www.cadcorner.ca/lisp.php
lisp is call: flat.lsp


Posted By: bertrand
Date Posted: 12.May.2011 at 10:10
Thanks, found the command but don't know how to use it Cry


Posted By: John Connor
Date Posted: 12.May.2011 at 11:47
Load flat.lsp using the APPLOAD command in AutoCAD.  Once it is loaded type the word flat at the command line to start the routine.

-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: philippe JOSEPH
Date Posted: 12.May.2011 at 14:44
I have found a method on a french site "top quiz des galčres autocad" and it works like this :
 
move all the objects from 0,0 to 0,0,1E99 ( "E" not "e" )
then move all the objects from 0,0,1E99 to 0,0,0
 
I use it to work on topografic files with ground curves at different levels and it works fine ( it solves the problems of chamfers betwwen lines etc... )


Posted By: John Connor
Date Posted: 12.May.2011 at 16:14
I would think the "e" would work either way.  Why would it be case sensitive?

-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: John Connor
Date Posted: 12.May.2011 at 16:16
Different methods to flatten entities with varying Z-coordinates to Z=0.
 

Via a macro (Source: CADforum)

 

Add a new macro (icon) to your toolbar - in fact two single-line macros (tool buttons) - one for selected objects and the second for all objects:

  
[FlattenSel]^C^C_UCS;;_select \_move _p;;0,0,1e99;;_move _p;;0,0,-1e99;;
 
[FlattenAll]^C^C_UCS;;_move _all;;0,0,1e99;;_move _all;;0,0,-1e99;;
_chprop;_all;;_thickness;0;;
 

(keep the macro text on a single line; the displayed format is to be used for old MNU/MNS files - if you add the macro through the new CUI dialog, use just its code starting with ^C)

Do not use it on 3D solids as it may distort them.

(original concept by Randy Richardson)

* * * * * * * * * *

Using FLATTEN.LSP as originally written by Mark Middlebrook with improvements by Vladmir Livshiz.

FLATTEN.LSP sets the Z-coordinates of these types of objects to 0

;;; in the World Coordinate System:

;;;  "3DFACE" "ARC" "ATTDEF" "CIRCLE" "DIMENSION"

;;;  "ELLIPSE" "HATCH" "INSERT" "LINE" "LWPOLYLINE"

;;;  "MTEXT" "POINT" "POLYLINE" "SOLID" "TEXT"

[add link to Flatten.lsp here]

 * * * * * * * * * *

In full AutoCAD one can go to Express Tools and use the FLATTEN OBJECTS command which can be found in the Modify section.

* * * * * * * * * *

Some users have suggested using the FLATSHOT command available in full AutoCAD.

* * * * * * * * * *

And an “oldie but goodie” from “back in the day” is the CHANGE command and its ELEVATION option.



-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>




Print Page | Close Window