TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: dubb on January 13, 2017, 03:14:52 PM

Title: How to update a block with entmod
Post by: dubb on January 13, 2017, 03:14:52 PM
I am pretty sure this question has been answered before. I'm still searching around for an answer.
I have a block, it contains a line and an attributed text. When I edit the entity with
Code: [Select]
(cons 50 0.0) It only rotates the line and not the entire block. I have attached the block in this post.

Code: [Select]
(defun c:test()
(setq en1 (car(entsel)))
(setq ed (entget en1))
(setq ed (subst (cons 50 0.0) (assoc 50 ed) ed ))
(entmod ed)
  )

Thanks in advance.
Title: Re: How to update a block with entmod
Post by: Grrr1337 on January 13, 2017, 04:19:06 PM
Try adding this line:
Code: [Select]
(command "_.ATTSYNC" "S" en1 "Y")
Title: Re: How to update a block with entmod
Post by: dubb on January 13, 2017, 04:23:38 PM
Try adding this line:
Code: [Select]
(command "_.ATTSYNC" "S" en1 "Y")

Ah...forgot about attsync.. :uglystupid2: Thanks.
Title: Re: How to update a block with entmod
Post by: Lee Mac on January 13, 2017, 07:21:24 PM
Or change the ActiveX rotation property of the VLA Block Reference object - this will affect any attributes held by the block.