Brian Spillane
Guest
|
Posted:
Fri Feb 18, 2005 10:01 am Post subject:
Re: anybody got swapblk.lsp? (urgent) |
|
|
(defun C:blkrpl ( / current blkcount objects blk blkname ble blk2)
(setq objects (ssget))
(setq blkcount (sslength objects))
(setq blkname (getstring "\nNew block name: "))
(setq current 0)
(while (< current blkcount)
(setq blk (ssname objects current))
; (setq blk (entget blk))
(setq currentlayer (getvar"clayer"))
(setq ble (entget blk))
(if (= (cdr (assoc 0 ble)) "INSERT")
(progn
(setq blk2 (cdr (assoc 2 ble)))
(setq blklayer (cdr (assoc 8 ble)))
(command "layer" "s" blklayer "")
(setq blkinsert (cdr (assoc 10 ble)))
(setq x1 (car blkinsert))(setq x1 (rtos x1 2 4))
(setq y1 (cadr blkinsert))(setq y1 (rtos y1 2 4))
(setq blkscale (cdr (assoc 41 ble)))
(setq blkangle (cdr (assoc 50 ble)))
(setq blkangle (angtos blkangle 0 4))
);progn
(princ "\nThat is not a block! ")
);if
(command "insert" blkname (strcat x1 "," y1) blkscale "" blkangle "")
(command "erase" blk "")
(setq current (+ current 1))
);end while
(command "layer" "s" currentlayer "")
(princ)
)
<t_lang1975@yahoo.com> wrote in message
news:1108553700.887551.114440@g14g2000cwa.googlegroups.com...
| Quote: | Can anyone mail me the old swapblk lisp.
Thank you
|
|
|