0

I am currently using the following Lisp code to show the X and Y coordinates from the origin:

(defun c:xy(/ pt pt1 pt2 x y  xy)

(setq pt (getpoint "\nPoint : "))
(setq x(rtos(car pt)))
(setq y(rtos(cadr pt)))

; x- leader horizontaal                                
(setq pt1 (getpoint pt "\nHORIZONTAL: "))
(command "leader" pt pt1 "" x "" )

; y- leader verticaal                                
(setq pt2 (getpoint pt "\nVERTICAL: "))
(command "leader" pt pt2  "" y "" ) )

(princ)

The script currently shows the Y coordinate (6050.00) as follows:

Horizontal Y

Though I'd like to have the Y coordinate drawn vertically like this:

Vertical Y

Is there any possibility to achieve this through Lisp? If so, what changes would I have to make?

Seki
  • 11,135
  • 7
  • 46
  • 70
James
  • 1,036
  • 1
  • 8
  • 24

1 Answers1

3

You can rotate the UCS as desired before you place the second leader:

(command "_UCS" "_Z" "90d")

Alternatively, use the _DIMORDINATE command instead of _LEADER so that the dimension text is associative and updates automatically.

Owen Wengerd
  • 1,628
  • 1
  • 11
  • 11