Quick Block
Quick Block
(OP)
Has anybody used/created a lisp routine that will allow you to select the objects... then auotmatically, change properties to layer 0, color Bylayer, ltype bylayer and then convert to a block using typed name or anonymus name remove object and insert in same location?
This sounds like a LISP routine, but I am not savy enough to write lisp files...or maybe one already exists that i can manipulate.
Any help would be cool
tzinger
This sounds like a LISP routine, but I am not savy enough to write lisp files...or maybe one already exists that i can manipulate.
Any help would be cool
tzinger





RE: Quick Block
Here is a very crude beginning.
It may not work right away but you get the idea, I'm sure.
(Defun C:MakeMeABlock (/pset)
(setq pset (ssget)) ; Select objects
(command "chprop" "p" "" "la" "0") ; Change layer
(command "chprop" "p" "" "co" "bylayer") ; Change color
(command "chprop" "p" "" "lt" "bylayer") ; Change linetype
(command "block" pause pause "p" "") ; Make a block
(command "insert" pause "@0,0" "1" "1" "0") ; Insert a block
)
It is not elegant, but it is quick!
RE: Quick Block
That was a great start, I was able to tweak it enough to get it to work the way I wanted it to. Here it is after tweak...
(Defun C:qb ()
(setq p (ssget)) ; Select objects
(command "chprop" "p" "" "la" "0" "") ; Change layer
(command "chprop" "p" "" "c" "bylayer" "") ; Change color
(command "chprop" "p" "" "lt" "bylayer" "") ; Change linetype
(command "copybase" "0,0,0" "p" "") ; Copy Items to Clip Board
(command "erase" "p" "") ; Delete original objects
(command "pasteblock" "0,0,0") ; Paste as Block in place of original objects
)
RE: Quick Block
LISP can be easy!