anybody got swapblk.lsp? (urgent)
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
anybody got swapblk.lsp? (urgent)

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Drafting
Author Message
Guest






Posted: Wed Feb 16, 2005 4:35 pm    Post subject: anybody got swapblk.lsp? (urgent) Reply with quote

Can anyone mail me the old swapblk lisp.

Thank you

Back to top
Brian Spillane
Guest





Posted: Fri Feb 18, 2005 10:01 am    Post subject: Re: anybody got swapblk.lsp? (urgent) Reply with quote

(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
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Drafting All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB