- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using this lisp to make fire alarm risers how would I add a vertical function to it? It lays them out horizontally.
(vl-load-com)
(defun c:BlocksToLine ( / s p i a l x)
(or *btl-a* (setq *btl-a* "STROMKREIS"))
(or *btl-d* (setq *btl-d* 2.))
(if (and (setq s (ssget "_:L" '((0 . "INSERT") (66 . 1 ))))
(not (initget 128))
(setq *btl-a* (cond ((getkword (strcat "\nTag name to sort by <" *btl-a* ">: "))) (*btl-a*)))
(setq *btl-d* (cond ((getdist (strcat "\nDistance in between <" (rtos *btl-d*) ">: "))) (*btl-d*)))
(setq p (getpoint "\nPlace them here: "))
)
(repeat (setq i (sslength s))
(setq e (ssname s (setq i (1- i))))
(if (not (vl-catch-all-error-p (setq a (vl-catch-all-apply 'getpropertyvalue (list e *btl-a*)))))
(setq l (cons (cons e a) l)))))
(setq l (vl-sort l '(lambda (e1 e2) (< (cdr e1) (cdr e2)))))
(setq x (- (car p) *btl-d*))
(foreach e l (command "_copy" (car e) "" "_non" (trans (cdr (assoc 10 (entget (car e)))) 0 1) "_non" (list (setq x (+ x *btl-d*)) (cadr p))))
(princ)
)
Solved! Go to Solution.