Results 1 to 3 of 3

Thread: SET POINT UCS COORDINATE

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2016-06
    Posts
    1
    Login to Give a bone
    0

    Default SET POINT UCS COORDINATE

    Hi all Please Help me write Lisp

    I want to click a point to enter the UCS value.
    Example : Original Coordinate = X = 30.5678 Y = 12.0456 Z = 0.0000
    I want to set a new = X = 0.0000 Y = 5000.0000 Z = 0.0000

    Thanks

    Untitled-Project.jpgUntitled-Project.jpg

  2. #2
    Member
    Join Date
    2001-03
    Location
    ROMANIA
    Posts
    35
    Login to Give a bone
    0

    Default Re: SET POINT UCS COORDINATE

    Welcome to the forum chan_ou!
    Try this:
    Code:
    (defun C:pCoords (/ cmd p1 x y z)
      (initget 1)
      (setq p1 (getpoint "\nSelect point: "))
      (if (eq (type p1) (quote LIST))
        (progn
          (setq x (cond ((getreal (strcat "\nNew X point coordinate <" (rtos (car p1) 2 8) ">: "))) ((car p1))))
          (if x
            (progn
              (setq y (cond ((getreal (strcat "\nNew Y point coordinate <" (rtos (cadr p1) 2 8) ">: "))) ((cadr p1))))
              (if y
                (progn
                  (setq z (cond ((getreal (strcat "\nNew Z point coordinate <" (rtos (caddr p1) 2 8) ">: "))) ((caddr p1))))
                  (if (and z (not (equal p1 (list x y z) 1e-8)))
                    (progn
                      (setq cmd (getvar "CMDECHO"))
                      (setvar "CMDECHO" 0)
                      (command "_.UCS" "_Origin" (mapcar (function -) p1 (list x y z)))
                      (setvar "CMDECHO" cmd)
                    )
                  )
                )
              )
            )
          )
        )
      )
      (princ)
    ) ;;C:pCoords

  3. #3
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    561
    Login to Give a bone
    0

    Default Re: SET POINT UCS COORDINATE

    Have a look at multi response at Forums/Autodesk.
    Attached Images Attached Images

Similar Threads

  1. Field to display point coordinates relative to CURRENT ucs, not WORLD UCS
    By jpcadconsulting347236 in forum AutoCAD Fields
    Replies: 5
    Last Post: 2015-04-16, 07:27 PM
  2. CV104-1P: One Point, Two Point, Red Point, Blue Point
    By Autodesk University in forum Civil Infrastructure
    Replies: 0
    Last Post: 2013-05-05, 03:17 AM
  3. CV12-4: One Point, Two Point, Red Point, Blue Point
    By Autodesk University in forum Civil Infrastructure
    Replies: 0
    Last Post: 2013-04-17, 04:50 AM
  4. Point Creation in UCS other than WCS and correct coordinate listing
    By SurveyorHead in forum AutoCAD Civil 3D - General
    Replies: 2
    Last Post: 2011-11-10, 01:23 AM
  5. UCS - Un-accessible Coordinate System
    By gregcashen in forum Revit Architecture - Wish List
    Replies: 19
    Last Post: 2004-06-06, 10:20 AM

Posting Permissions

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