(defun c:chpoint()
(PROMPT"\nSELECT TEXT:")
(SETQ NA (ENTSEL))      ;GET ENTITY NAME
(SETQ MP (CAR (CDR NA)))
(SETQ NT (ENTGET (CAR NA)))      ;GET ENTITY NAME
(SETQ LA (CDR (ASSOC 8 NT)))
(SETQ TP (CDR (ASSOC 10 NT)))
(PROMPT"\nSELECT LINE:")
(COMMAND "OSNAP" "NEAR")
(SETQ P1 (GETPOINT"\nSELECT LINE:"))
(COMMAND "OSNAP" "NONE")
(SETQ P2 (GETPOINT"\nSELECT TURN POINT:"))
;(COMMAND "BREAK" "F" P1 P1)
(COMMAND "SELECT" P1 "")
(SETQ SA (SSGET "P" ))                ;select entity
(SETQ N (SSLENGTH SA))                      ;LIST HOW MANY SELECT
(SETQ NAL (ENTGET (SSNAME SA 0)))                    ;GET ENTITY NAME
(SETQ NP1 (ASSOC 11 NAL))
(SETQ NP2 (ASSOC 10 NAL))
(SETQ DR1 (CDR NP1))
(SETQ DR2 (CDR NP2))
(COMMAND "ERASE" P1 "")
(SETQ D1 (DISTANCE DR1 TP))
(SETQ D2 (DISTANCE DR2 TP))
(SETQ RDA (MAX D1 D2))
(IF (= D1 RDA)
    (SETQ DRA DR1)
    (SETQ DRA DR2)
)
(SETQ RDB (MIN D1 D2))
(IF (= D1 RDB)
    (SETQ DRB DR1)
    (SETQ DRB DR2)
)
(SETQ AG (+ (ANGLE DRA P1) (DTR 90)))
(SETQ DRINT (POLAR P2 AG 1))
(SETQ INT (INTERS DR1 DR2 P2 DRINT NIL))
(SETQ AG1 (ANGLE INT P2))
(SETQ D3 (DISTANCE INT P2))
(SETQ DR3 (POLAR DRB AG1 D3))
(COMMAND "LAYER" "SET" LA "")
(COMMAND "LINE"  DRA P1 P2 DR3 "")
(SETQ D4 (DISTANCE DRB DR3))
(SETQ TP1 (POLAR TP AG1 D4))
(SETQ LP (GETVAR "LUPREC"))   ;LP DIGITAL
(SETQ TP (LIST (ATOF (RTOS (CAR TP ) 2 LP)) (ATOF (RTOS (CADR TP ) 2 LP))))
(COMMAND "MOVE" MP "" TP TP1)
)
