Results 1 to 2 of 2

Thread: LISP Routine for adding Coords / Leader / Northing + Easting to Drawing

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

    Default LISP Routine for adding Coords / Leader / Northing + Easting to Drawing

    I have a LISP routine (LP) that when I ID a point it reads: N 5000'-0" + W 5000'-0". When I use the LISP routine (LP) it reads: N 416'-8" + W 416'-8". I can change this routine to it's original state and it will read the correct Coords but in a decimal format, once I change it it is reduced by 12. ie 416'-8" X 12 = 5000'-0". Any ideas why I cannot change in DIMStyle or DIMLFAC and have the result I want? Thank you for the help!!!


    Here is the LISP routine that I am using:

    Code:
    (defun C:LP1(/ PNT1 P1X P1Y STDY DY COORDN COORDW PTXT)
    (setq PNT1 (getpoint
    "\nPick coordinate point: "))
    (setq P1X (car pnt1)) ;x coord
    (setq P1Y (cadr pnt1)) ;y coord
    (setq STDX (rtos (/ (abs P1X) 12) 4 3))
    (setq STDY (rtos (/ (abs P1Y) 12) 4 3))
    (setq COORDN (strcat "N " STDY ))
    (setq COORDW (strcat "W " STDX ))
    (setq PTXT (getpoint
    "\nPick text location: "))
    (command "LEADER" PNT1 PTXT "" COORDN COORDW "")
    (princ)
    )
    Last edited by rkmcswain; 2013-12-11 at 02:03 PM. Reason: added [CODE] tags

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: LISP Routine for adding Coords / Leader / Northing + Easting to Drawing

    The (rtos) function in your code is what is doing the division by 12, specifically the mode argument. Change the "4" to a "2" in each of them and look at the difference in the result.
    R.K. McSwain | CAD Panacea |

Similar Threads

  1. ID Northing/Easting In C3D
    By jimmyhill in forum AutoCAD Civil 3D - General
    Replies: 13
    Last Post: 2016-01-26, 11:00 PM
  2. 2010: SETUP 2010 MEP DRAWING FOR NORTHING AND EASTING
    By SHOLLAND_CAD in forum AutoCAD General
    Replies: 0
    Last Post: 2011-09-30, 04:28 PM
  3. Northing & Easting
    By gmarshall.222707 in forum Dynamic Blocks - Sharing
    Replies: 0
    Last Post: 2009-08-11, 10:02 PM
  4. Lisp routine for Labeling Northing and Easting
    By mserapiglia in forum AutoLISP
    Replies: 1
    Last Post: 2008-05-21, 10:01 PM
  5. Northing & Easting Miss Surveying Lisp routine
    By amazingb2003 in forum AutoLISP
    Replies: 6
    Last Post: 2008-04-23, 06:45 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
  •