01-16-2019
01:30 PM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
01-16-2019
01:30 PM
The following vlisp program creates a CSV file of the values of selected dimension lines. It can be directly opened by Excel and then copy and pasted to wherever you wish.
(defun c:getdims (/ fn)
; create a csv file of selected dimension lines.
; LRM 1/16/2019
;
(setq f (getfiled "Create Output File" "" "csv" 1))
(setq fn (open f "w"))
(if (setq ss (ssget '((0 . "DIMENSION"))))
(progn
(setq i 0)
(while (setq en (ssname ss i))
(setq ed (entget en))
(setq dv (cdr (assoc 42 ed)))
(if (= (cdr (assoc 70 ed)) 34) ; check if angular dim
(setq dv (/ (* dv 180) 3.xxx-xxxxxxxx))
)
(write-line (rtos dv) fn)
(setq i (1+ i)
) ; end setq i
) ;end while
) ; end progn
) ;end if
(close fn)
(princ "\n File ") (princ f) (princ " created.")
(princ)
)
lee.minardi