Results 1 to 2 of 2

Thread: Lisp to change "z" value (add 0.04 units)

  1. #1
    Member
    Join Date
    2014-11
    Posts
    4
    Login to Give a bone
    0

    Question Lisp to change "z" value (add 0.04 units)

    Hello users,
    I mess up something in my Autocad Civil 3D project. Now I need do something to change "z" value of selected 3d polylines to "z+0.04" (upper 0.04 units). Is there any possibility to do it faster then just clicking every 3d polyline vertex and change "z" manually


    OK I found one
    (defun c:3du()
    (princ "\nSelect 3D Polylines:")
    (setq lset(ssget (list (cons 0 "POLYLINE"))))
    (setq adVal(getreal "\nType the value to be added :"))
    (if (= lset nil)
    (progn
    (princ "\nNothing Selected")
    )
    (progn
    (setq llen(sslength lset))
    (setq lcntr 0)
    (repeat llen
    (setq curl(ssname lset lcntr))
    (setq vt (entnext curl))
    (while (/= (cdr (assoc 0 (entget vt))) "SEQEND")
    (setq ed (entget vt))
    (setq old (assoc 10 ed))
    (setq 3dp(cdr old))
    (setq nlistx(car 3dp))
    (setq nlisty(cadr 3dp))
    (setq nlistz(+ adVal (caddr 3dp)))
    (setq new (cons 10 (list nlistx nlisty nlistz)))
    (setq ed (subst new old ed))
    (entmod ed)
    (setq vt (entnext vt))
    )
    (entupd curl)
    (setq lcntr(1+ lcntr))
    )
    )
    )
    (princ)
    )
    (princ "\nType \"3du\" to update ZValue of Verticies of 3DPolyline") (princ)
    Last edited by zwonko684167; 2014-11-28 at 08:50 PM.

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Lisp to change "z" value (add 0.04 units)

    Did you try the move command? move 0,0,0.04

Similar Threads

  1. LISP to change file paths in AutoCad "Options"
    By owarzecha160932 in forum AutoLISP
    Replies: 4
    Last Post: 2014-07-16, 12:30 PM
  2. 2014: Can't change parameter from "Instance" to "Type" in template family
    By Pavlin in forum Revit MEP - Families
    Replies: 2
    Last Post: 2014-02-11, 11:52 AM
  3. Replies: 8
    Last Post: 2012-08-18, 01:31 AM
  4. Replies: 0
    Last Post: 2012-06-06, 11:54 AM
  5. Change "Edit Option" button to "Finish Editing" while in the Design Option
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2009-02-01, 07:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •