Message 1 of 7

Not applicable
12-20-2017
08:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm hoping someone can help me with this issue. I'm trying to create a lisp that will prompt the user to select a block then edit the block and change all the entities to layer 0 and bylayer.
Here is what i have. I've tried several different methods but i haven't had any luck so far. I'm obviously new to LISP and programming in general.
(defun c:fb (/ block bname)
(setq block (ssget'((0 . "INSERT"))))
(setq bname (cdr (assoc 2 (entget(ssname block)))))
(command "-bedit" bname )
(command "change" "all" "" "p" "la" "0" "")
(command "setbylayer" "all" "" "yes" "yes")
(princ)
)
Thanks in advance.
Solved! Go to Solution.