Autocad R14 - adjusting z values of objects?

Discussion in 'AutoCAD' started by Alex, Apr 15, 2004.

  1. Alex

    Alex Guest

    Hello,

    i am working in a plan file that contains lines with different z-axis
    values. for instance, one endpoint of a line has a z value of zero,
    while the other endpoint has a z value of 100. i need to know the
    command where you can select ALL objects in the file at the same time
    and adjust the z values for all of them at once...

    thanks in advance for your help...
     
    Alex, Apr 15, 2004
    #1
    1. Advertisements

  2. Alex

    bestafor Guest

    HiHo;
    There is a progrem called "flatten.lsp" that sets all z coordinates to zero.
    By changing this line " nplist (reverse (append '(0.0) (cdr (reverse
    oplist))))"
    to " nplist (reverse (append '(YOUR ELEVATION) (cdr (reverse oplist))))"
    you can change the objects to a elevation of your choice.
     
    bestafor, Apr 15, 2004
    #2
    1. Advertisements

  3. Save the following in a file called "flat.lsp" in you acad path, then
    appload the lisp file and issue the command "flat".
    It will put everything to z=0, blocks with Z, and some surfaces of solids,
    and edges of things with thickness. Make sure everything is unlocked and
    visible.

    --


    MichaelB
    www.michaelbulatovich.com



    (defun C:FLAT ()
    (command "_.move" "_all" "" '(0 0 1e99) ""
    "_.move" "_p" "" '(0 0 -1e99) "")
    (princ)
    )
     
    Michael Bulatovich, Apr 16, 2004
    #3
  4. Alex

    Smiley Guest

    (Alex) wrote in message
    Yes, you can. Just select the lines, and then open the properties
    window (hmm... I don't know for sure that this is a verison 14 option)
    Then just enter 0 for the Z-Value field.

    Certain objects will not accept this (such as 3D solids), so to
    allow the properties window to show it to you, you must only select
    the allowed entities. If the Z-Value field doesn't show up, you have
    something in your selection set that can't have a z-value set for it.

    Also, another trick is to type
    MOVE ALL 0,0,0 0,0,1e99
    MOVE ALL 0,0,0 -0,0,1e99

    This moves objects as high as AutoCAD will allow and then back to zero
    elevation, thus rounding off any Z-value to zero. This is what the
    mentioned LISP routine does.

    Joe
     
    Smiley, Apr 16, 2004
    #4
  5. I meant to say:

    It will put everything to z=0, >>EXCEPT<< blocks with Z in them, and some
    surfaces of solids,
    and edges of things with thickness.
     
    Michael Bulatovich, Apr 16, 2004
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.