CAD Forum ► EN ► AutoCAD ► Objects have different Z coordinates
Display full version of the post: Objects have different Z coordinates
bertrand
12.05.2011, 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!
dabrovsky
12.05.2011, 09:55
I hade some time ago lisp file which could bring all objects to z=0
I wil try find it for you
dabrovsky
12.05.2011, 10:01
I have got one:
http://www.cadcorner.ca/lisp.php
lisp is call: flat.lsp
bertrand
12.05.2011, 10:10
Thanks, found the command but don't know how to use it
John Connor
12.05.2011, 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.
John Connor2011-05-12 11:49:06
philippe JOSEPH
12.05.2011, 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... )
John Connor
12.05.2011, 16:14
I would think the "e" would work either way. Why would it be case sensitive?
John Connor
12.05.2011, 16:16
Normal
0
false
false
false
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
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.