|
发表于 2022-7-6 10:31:24
|
显示全部楼层
Hello everyone,
I really like this lisp code and use it all the time for our ventilation parts , I just wondered if one of you clever people could help me tweak it alittle.
After selecting the Prefix I would like the code to search the drawing for all blocks called “ID” check the prefix selected “for ensample A” and find the last tag value used for example A12” and prompt the user to use the next value “A13” or enter there own number to start from
I currently have to do this manually
This is what I have so far
(if (ssget "x" '((2 . "ID")))
(progn
(setq ent (ssname (ssget "x" '((2 . "ID"))) 0))
(while (not (eq '"REV" (cdr (assoc 2 (setq attlst (entget ent))))))
(setq ent (entnext ent))
)
(if (= 1 (setq rev# (+ 1 (ascii (cdr (assoc 1 attlst))))))
(setq rev# 65)
)
My block is "ID" and theattribute tag name is "REV" |
|