anchor.diff:    ; SAVE SETTINGS
     ; (save_environment (list "osmode" "angdir" "angbase"))
   
  +  (if (and ent_name1 ent_name2)
  +    (if (and (= 'ename (type ent_name1)) (= 'ename (type ent_name2)))
  +      (princ "\nUnder construction...")
  +      (cond
  +        ((/= 'ename (type ent_name1)) (princ "\nERROR @ DT:RR > ent_name1 type is incorreect")(princ))
  +        ((/= 'ename (type ent_name2)) (princ "\nERROR @ DT:RR > ent_name2 type is incorreect")(princ))
  +      );END cond
  +    );END if
  +    (cond
  +      ((not ent_name1) (princ "\nERROR @ DT:RR > ent_name1 = nil")(princ))
  +      ((not ent_name2) (princ "\nERROR @ DT:RR > ent_name2 = nil")(princ))
  +    );END cond
  +  );END if
     ; Get object, cases:
       ; If ent_name2 is line
       ; If ent_name2 is polyline: allow perpendicular to straight segments and curve segments along all polyline, not just the segment where you have clicked
  -    ; If ent_name2 is circle
  +    ; If ent_name2 is circle > tangent
       ; If ent_name2 is arc
       ; If ent_name2 is ellipse
  -    ; If ent_name2 is block
  +    ; If ent_name2 is INSERT, text or Mtext > just copy rotation
       ; If ent_name2 is 3Dpoly
       ; If ent_name2 is xline
       ; if ent_name2 is ray
  
positive.code:     (car (entsel "\nSelect object to align to:"))
    )
  ; PURPOSE: align text to selected object, keeping readability
  )
  (defun RR ( ent_name1 ent_name2 )
    ; Align ent_name1 to ent_name2 dynamically
    ; Return aligned and reference entity names
    ; or nil if something wrong
  
negative.code:   ; Author: David Torralba
    ; Last revision: 2017-01-29
  );END defun
  