AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Z Coordinates to 0

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
3171 Views, 6 Replies

Z Coordinates to 0

I have a drawing with some of the street centerline data (polylines) at
different Z coordinate values instead of zero for these values which is what
I want I have tried to define a range table for the elevation values in the
property alterations to be set to zero when querying these centerlines into
a new drawing but the Z coordinate values still remain at non-zero. Is this
how I should be going about this or is there something that I am missing??
Can this be done with the alter properties under defining queries in Map??
Any assistance with this is appreciated.
6 REPLIES 6
Message 2 of 7
randerson138
in reply to: Anonymous

Gregg:

I believe you could change the 3d polylines through map tools to 2d polylines. That will fix the problem.

Otherwise you could use flatten comand or the modz lisp.

Hope that this will help.
Message 3 of 7
Anonymous
in reply to: Anonymous

Thanks for the suggestions.  The line entities
are not 3D polylines, they are LWPOLYLINES with different Z coordinate
values.  How this happens I do not know since I thought LWPOLYLINES could
not have differing Z coordinates for the start points/end points. 
Nevertheless the routine in Map Tools does not work for this situation.  Is
the 'flatten' command a new one for Map 2002 since it does not exist in Map 2000
which is what I have.  And, where can I obtain the modz.lsp routine since I
don't seem to have that either (is this a new lisp shipped with Map
2002?).  Any other suggestions/help with this is much
appreciated.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Gregg:

I believe you could change the 3d polylines through map tools to 2d
polylines. That will fix the problem.

Otherwise you could use flatten comand or the modz lisp.

Hope that this will help.

Message 4 of 7
Anonymous
in reply to: Anonymous

Hi Gregg,

 

LWPOLYLINES have an elevation property and a list
of 2D coordinates. I am a bit confused by your message that states you have
"LWPOLYLINES with different Z coordinate values". Are you saying that you have
plines that are at different elevations from one another or plines that have
different elevations along the coordinate string?

 

Select one of these objects and use the list
command.

If the object is indeed a Light Weight Polyline it
will return something like:

 


size=2>                 
LWPOLYLINE  Layer:
"0"
                           
Space: Model
space
                  
Handle =
2C
             
Open
    Constant width   
0.0000
             
area  
0.0000
           
length   7.9218

 


size=2>          at point 
X=   2.1126  Y=   4.6770  Z=  
0.0000
          at point 
X=   9.2755  Y=   8.0606  Z=  
0.0000

You can move this type of object to a zero
elevation by modifying the elevation property.

Open the property manager, select one or more
objects and set the elevation to the desired value.

 

If the object type is not LWPOLYLINE but rather
POLYLINE it will return something like:

 


size=2>                 
POLYLINE  Layer:
"0"
                           
Space: Model
space
                  
Handle =
2D
             
Open
    starting width   
0.0000
      ending width   
0.0000
             
area   
0.0000
           
length    8.3147

 


size=2>                 
VERTEX    Layer:
"0"
                           
Space: Model
space
                  
Handle =
2E
               
at point, X=   2.4546  Y=   2.1214  Z=  
0.0000
    starting width   
0.0000
      ending width   
0.0000

 


size=2>                 
VERTEX    Layer:
"0"
                           
Space: Model
space
                  
Handle =
2F
               
at point, X=   9.8514  Y=   5.9189  Z=  
0.0000
    starting width   
0.0000
      ending width   
0.0000

 


size=2>                 
END SEQUENCE  Layer:
"0"
                           
Space: Model
space
                  
Handle = 30

This is an older pline object that still requires a
constant z value but does not have an elevation property.

Use the convert command to change this to the new
LWPOLYLINE object, then modify the elevation property.

 

If the object type is 3DPOLYLINE, the elevation
values may vary. In this case, you will be stuck. You will need to track down an
application that will set the z coordinates of the 3DPOLYLINE to the same value.
Then convert the 3DPOLYLINE to a LWPOLYLINE.

 

If you have a "bad" POLYLINE object that does have
varying elevations, try the audit command. It may fix them for
you...

 

Let me know what you find out and I may be able to
help you out...

 

Good luck,

Will


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

Thanks for the suggestions.  The line
entities are not 3D polylines, they are LWPOLYLINES with different Z
coordinate values.  How this happens I do not know since I thought
LWPOLYLINES could not have differing Z coordinates for the start points/end
points.  Nevertheless the routine in Map Tools does not work for this
situation.  Is the 'flatten' command a new one for Map 2002 since it does
not exist in Map 2000 which is what I have.  And, where can I obtain the
modz.lsp routine since I don't seem to have that either (is this a new
lisp shipped with Map 2002?).  Any other suggestions/help with this
is much appreciated.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Gregg:

I believe you could change the 3d polylines through map tools to 2d
polylines. That will fix the problem.

Otherwise you could use flatten comand or the modz lisp.

Hope that this will help.

Message 5 of 7
Anonymous
in reply to: Anonymous

Thanks for your input Will.  To help clarify
myself, below is a real example of what I am talking about:

       
        LWPOLYLINE  Layer:
C-RW-CL
                           
Space: Model
space
                  
Handle =
4136B
             
Open
    Constant width    0.0000
Extrusion
direction relative to
UCS:
                  
X=   0.0005  Y=   0.0005  Z=  
1.0000

 


size=2>          at point 
X=560676.9351  Y=901238.2575 
Z=-733.8605
          at
point  X=560678.2377  Y=901543.2547  Z=-734.0097

 


size=2>             
area  
0.0000
           
length   305.0000

 

As you can see, the Z coordinate values or
elevations are in the negative direction and vary for each point.  I
previously tried to set these elevations to zero through the property manager as
I have done this before succesfully with arcs (I set the Center Z coordinates to
zero and that worked fine), but it did not work for the LWPOLYLINES,  i.e.
the Z elevations for each point of each LWPOLYLINE entity remain at these
negative Z coordinate values in the drawing so the drawing database did not
change as reflected in the above example.  I would have exploded these
LWPOLYLINES to LINES as I have a lisp routine that sets the Z coordinates for
each line to zero and writes the new Z coordinate value back to the drawing
database.  However, these LWPOLYLINES have object data attached to each
entity and exploding these LWPOLYLINES to LINES will obliterate the attached
data. The audit command was also tried but there were no errors to be
fixed.  So, if you have any other ideas or suggestions for this I would be
very grateful.  Thanks again.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

Hi Gregg,

 

LWPOLYLINES have an elevation property and a list
of 2D coordinates. I am a bit confused by your message that states you have
"LWPOLYLINES with different Z coordinate values". Are you saying that you have
plines that are at different elevations from one another or plines that have
different elevations along the coordinate string?

 

Select one of these objects and use the list
command.

If the object is indeed a Light Weight Polyline
it will return something like:

 


size=2>                 
LWPOLYLINE  Layer:
"0"
                           
Space: Model
space
                  
Handle =
2C
             
Open
    Constant width   
0.0000
             
area  
0.0000
           
length   7.9218

 


size=2>          at point 
X=   2.1126  Y=   4.6770  Z=  
0.0000
          at
point  X=   9.2755  Y=   8.0606 
Z=   0.0000

You can move this type of object to a zero
elevation by modifying the elevation property.

Open the property manager, select one or more
objects and set the elevation to the desired value.

 

If the object type is not LWPOLYLINE but rather
POLYLINE it will return something like:

 


size=2>                 
POLYLINE  Layer:
"0"
                           
Space: Model
space
                  
Handle =
2D
             
Open
    starting width   
0.0000
      ending width   
0.0000
             
area   
0.0000
           
length    8.3147

 


size=2>                 
VERTEX    Layer:
"0"
                           
Space: Model
space
                  
Handle =
2E
               
at point, X=   2.4546  Y=   2.1214 
Z=   0.0000
    starting width   
0.0000
      ending width   
0.0000

 


size=2>                 
VERTEX    Layer:
"0"
                           
Space: Model
space
                  
Handle =
2F
               
at point, X=   9.8514  Y=   5.9189 
Z=   0.0000
    starting width   
0.0000
      ending width   
0.0000

 


size=2>                 
END SEQUENCE  Layer:
"0"
                           
Space: Model
space
                  
Handle = 30

This is an older pline object that still requires
a constant z value but does not have an elevation property.

Use the convert command to change this to the new
LWPOLYLINE object, then modify the elevation property.

 

If the object type is 3DPOLYLINE, the elevation
values may vary. In this case, you will be stuck. You will need to track down
an application that will set the z coordinates of the 3DPOLYLINE to the same
value. Then convert the 3DPOLYLINE to a LWPOLYLINE.

 

If you have a "bad" POLYLINE object that does
have varying elevations, try the audit command. It may fix them for
you...

 

Let me know what you find out and I may be able
to help you out...

 

Good luck,

Will


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

Thanks for the suggestions.  The line
entities are not 3D polylines, they are LWPOLYLINES with different Z
coordinate values.  How this happens I do not know since I thought
LWPOLYLINES could not have differing Z coordinates for the start points/end
points.  Nevertheless the routine in Map Tools does not work for this
situation.  Is the 'flatten' command a new one for Map 2002 since it
does not exist in Map 2000 which is what I have.  And, where can I
obtain the modz.lsp routine since I don't seem to have that either (is
this a new lisp shipped with Map 2002?).  Any other
suggestions/help with this is much appreciated.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Gregg:

I believe you could change the 3d polylines through map tools to 2d
polylines. That will fix the problem.

Otherwise you could use flatten comand or the modz lisp.

Hope that this will
help.

Message 6 of 7
Anonymous
in reply to: Anonymous

"Gregg Greer" wrote in message
news:C4DD1EBB1A038EEEC6DF22B2A583CE73@in.WebX.maYIadrTaRb...

>> LWPOLYLINE Layer: C-RW-CL
>> Space: Model space
>> Handle = 4136B
>> Open
>> Constant width 0.0000
>> Extrusion direction relative to UCS:
>> X= 0.0005 Y= 0.0005 Z= 1.0000
>>
>> at point X=560676.9351 Y=901238.2575 Z=-733.8605
>> at point X=560678.2377 Y=901543.2547 Z=-734.0097
>>
>> area 0.0000
>> length 305.0000

Gregg,

That polyline was drawn on a different UCS - notice
the Extrusion direction values. AutoCAD expresses
objects relative to the current UCS when listed.
That's why you're see the differing negative Zs
for each vertex.

I can't think of a built-in way to project them
back to your current workplane. It can be done
using custom programming, and you might find
a program or lisp routine out there somewhere.
Look for project.lsp or flatten.lsp

Cheers-

rdh.
Message 7 of 7
Anonymous
in reply to: Anonymous

Gregg Greer wrote:

> Extrusion direction relative to UCS:
> X= 0.0005 Y= 0.0005 Z= 1.0000
>
> at point X=560676.9351 Y=901238.2575 Z=-733.8605
> at point X=560678.2377 Y=901543.2547 Z=-734.0097

Zip and post your drawing to customer-files group and I'll fix it for
you. Also would you want flat LWPOLY's or 3DPOLY's.

Terry

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost