09-10-2021
04:44 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
09-10-2021
04:44 AM
In simplest terms, here's one way:
(defun C:TEST (/ pt1 pt2)
(command
"_.rectang"
(setq pt1 (getpoint "\nCorner of rectangle: "))
(setq pt2 (getcorner pt1 "\nOpposite corner: "))
"_.dtext" "_mc" "_m2p" pt1 pt2 "" ""
); command
(princ)
)
It assumes you want to draw the rectangle by simple opposite corners, and not call for any of the options within this routine [filleted corners, etc.], and that the Text would be at 0° rotation and in whatever the current Style is, and that Style does not have a fixed height. Variations in such things can be accounted for.
Kent Cooper, AIA