Message 1 of 3
Replace entities / blocks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone, everything good?
I need help 😞 I'm learning autolisp and would like to create a code
but I do not know if it is possible or if there is a way to do better.
I need help 😞 I'm learning autolisp and would like to create a code
but I do not know if it is possible or if there is a way to do better.
So come on. I have a sequence of 7 "entities" in my drawing,
and would be erased and replaced by one another. (follows a .dwg showing)
BUT HOW TO DO IT
I use this code to delete the selected entity:
and would be erased and replaced by one another. (follows a .dwg showing)
BUT HOW TO DO IT
I use this code to delete the selected entity:
(Defun c:SBT (/ ss) (if(setq ss (ssget ":L" '((0 . "CIRCLE,TEXT")))) (mapcar 'entdel (vl-remove-if 'listp(mapcar 'cadr(ssnamex ss)))) ) (Subsbt) )right after you create a subroutine to make the choice of entity.
(defun Subsbt (/ aa ) (initget "1 2 3 4 5 6 7") (setq aa (cond ((getkword "\n[1/2B/3C/4D/5E/6F/7] <1>: ")) ("1"))) )but how does it give continuity? how to store the selection to work on all drawings?
Note: Note These entities are exploded blocks inserted in this way:
(command "Insert" "T:/LC/B1" "S" 1 pause pause "Explode" (entlast))The block name is the same as the name of the text.