Results 1 to 3 of 3

Thread: LISP for x-distance (picking 2 points) value & y-distance (picking 2 points) value to be placed as text format

  1. #1
    Member
    Join Date
    2008-07
    Posts
    12
    Login to Give a bone
    0

    Default LISP for x-distance (picking 2 points) value & y-distance (picking 2 points) value to be placed as text format

    Hi,
    i want a LISP for x-distance (picking 2 points) value & y-distance (picking 2 points) value to be placed as text format.
    Output e.g: X=5000MM, Y=5000MM.

    Please help.

    Thanks,

  2. #2
    All AUGI, all the time Tharwat's Avatar
    Join Date
    2010-06
    Posts
    928
    Login to Give a bone
    0

    Default Re: LISP for x-distance (picking 2 points) value & y-distance (picking 2 points) value to be placed as text format

    Check this out .
    if you need any modification just ask .
    Code:
    (defun c:test (/ p)
      ;; Tharwat 21. 07. 2011
      (while
        (setq p (getpoint "\n Specify point :"))
         (entmakex
           (list '(0 . "TEXT")
                 '(100 . "AcDbEntity")
                 '(100 . "AcDbText")
                 (cons 10
                       (trans (list (+ (car p) (/ (getvar 'textsize) 2.))
                                    (+ (cadr p) (/ (getvar 'textsize) 2.))
                              )
                              1
                              0
                       )
                 )
                 (cons 40 (getvar 'textsize))
                 (cons 7 (getvar 'textstyle))
                 (cons 1
                       (strcat "X ="
                               (rtos (car p) 2)
                               "MM"
                               "    "
                               "Y="
                               (rtos (cadr p) 2)
                               "MM"
                       )
                 )
                 '(210 0.0 0.0 1.0)
                 '(50 . 0.)
           )
         )
      )
      (princ)
    )
    Tharwat

  3. #3
    Member
    Join Date
    2008-07
    Posts
    12
    Login to Give a bone
    0

    Default Re: LISP for x-distance (picking 2 points) value & y-distance (picking 2 points) value to be placed as text format

    it works!!!
    thx

Similar Threads

  1. 2013: Picking end points on 3d objects
    By balcomwoodworks164944 in forum AutoCAD 3D (2007 and above)
    Replies: 3
    Last Post: 2014-11-17, 11:40 PM
  2. Draw rectangles by picking 3 points
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2014-10-27, 09:25 PM
  3. Points- create points slope-distance
    By jenniferchavez in forum AutoCAD Civil 3D - Survey
    Replies: 1
    Last Post: 2009-12-10, 06:03 PM
  4. Define a print area by picking two points
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 2
    Last Post: 2007-09-27, 08:00 AM
  5. Can you make family & place width by picking two points?
    By rgesner in forum Revit Architecture - Families
    Replies: 2
    Last Post: 2005-12-22, 07:44 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
  •