Originally Posted by
Cro_CAD
Hello Everyone
Is there any way to create dynamic block (or some other solution) with elevation symbol and text with y coordinate value above it? The goal is to create block who upon insertion updates the value of the y coordinate. The value (y coordinate) should be the bottom point of elevation symbol.
elevation symbol.png
I would usualy using ordinate dimension, but I have may dimensions to place.
Sry on may not so good english, it's not my native
Kind Regards!
Maybe this can help. Block with attribute.
Or a lisp routine
Code:
;TRIANGULO CON Y
(defun CON (a)
(* PI (/ a 180.0))
);defun
(defun C:Y (/ rat ort ph d1 d2 opr r1 r1y p_ros vay mt_y r2 r3)
;Guarda y establece variables________________________________________________________________
(setq rat (getvar 'textsize))
(setq ort (getvar ' orthomode))
(setvar 'orthomode 1)
(setvar 'tspacefac 1)
(setvar 'luprec 2)
(command "style" "COTASY" "ARIAL ROUNDED MT BOLD" "0" "" "12" "" "" );Estilo de texto
;Establece altura de texto _____________________________________________________________________
(setq ph (getdist "\nAltura de Texto: <0.18>: ")
ph (if (null ph) 0.18 ph))
(setvar 'textsize ph)
(setq d1 ( * ph 2.0))
(setq d2 ( * ph 6.6))
;if OTRO 1=_________________________________________________________________________________
(defun r_r (/ p_ros )
(setq p_ros (getstring t "\nQue prefijo: <Y=>: ")
p_ros (if (null p_ros) Y= p_ros))
(while
(setq r1 (getpoint "\nQUE PUNTO: "))
(setq r1y (cadr r1)) ;coordinada en y
(setq vay (rtos r1y 2 2))
(setq mt_y (strcat p_ros "" vay ))
(setq r2 (polar r1 (CON 90.0) d1))
(setq r3 (polar r1 (CON 90.0) (+ d1 (* d1 0.20))))
(command "pline" r1 "w" 0.0 d2 r2 "")
(command "mtext" r3 "j" "bc" "r" "0" "w" "0" mt_y "")
);while
);end r__r
(initget "Y OTRO")
(setq opr (getkword "\nQue prefijo para la cota en Y [Y/OTRO] <Y=>: "))
(if (= opr "OTRO") (r_r) );end if
(while
(setq r1 (getpoint "\nQUE PUNTO: "))
(setq r1y (cadr r1)) ;coordinada en y
(setq vay (rtos r1y 2 2))
(setq mt_y (strcat "Y= " vay ))
(setq r2 (polar r1 (CON 90.0) d1))
(setq r3 (polar r1 (CON 90.0) (+ d1 (* d1 0.20))))
(command "pline" r1 "w" 0.0 d2 r2 "")
(command "mtext" r3 "j" "bc" "r" "0" "w" "0" mt_y "")
);while