04-21-2019
11:18 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
04-21-2019
11:18 AM
Here's a simple vlisp program "circlemark" that adds scaled blocks at the center of selected circles.
Create a block with a width and height of 1.0. The block will be scaled to the size of the circle when added to the drawing. You can explode the block and delete the circles after execution.
; Adds a blocked at the location of selected circles.
; The block is scaled by the radius of the circle.
; LRM 4/21/2019
(defun c:circlemark(/)
(setq bn (getstring "\nEnter block name:"))
if (setq ss (ssget '((0 . "CIRCLE"))))
(progn
(setq i 0)
(while (setq en (ssname ss i))
(setq ed (entget en))
(setq r (cdr (assoc 40 ed)))
(setq pos (cdr (assoc 10 ed)))
(command "-insert" bn "s" (* 2 r) pos "")
(setq i (1+ i)
) ; end setq i
) ;end while
) ; end progn
) ;end if
(princ)
)
lee.minardi