TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: w64bit on September 08, 2021, 07:13:06 AM
-
Hello,
I am trying to run ATTSYNC only when blocks with attributes are present.
Tried with this but it's not working.
Can anyone help, please.
(if (and (setq ent (entnext ent))
(eq "ATTRIB" (cdr (assoc 0 (entget ent)))))
(command "ATTSYNC" "N" "*"))
-
You will need to set blkname
(if (= 2 (cdr (assoc 70 (tblsearch "block" blkname))))
(vl-cmdf "ATTSYNC" "N" blkname)
)
-
Thank you but I need to check if any attribute blocks exists in the drawing, not a specific one.
-
I'm pretty sure ATTSYNC ignores all blocks without attributes.
is there any reason you could not just use
(command "ATTSYNC" "N" "*")
?
-
I receive the message: "This drawing contains no attributed blocks" (this message I want to avoid in order that ATTSYNC to continue).
If the drawing contains at least one attribute block, indeed ATTSYNC is ignoring blocks without attribute.
-
I receive the message: "This drawing contains no attributed blocks" (this message I want to avoid in order that ATTSYNC to continue).
If the drawing contains at least one attribute block, indeed ATTSYNC is ignoring blocks without attribute.
Perhaps:
(if (ssget "_X" '
((0 .
"insert") (66 .
1))) )
-
Yes! Thank you very much.
-
Yes! Thank you very much.
Glad to help!