Author Topic: How to update a block with entmod  (Read 1243 times)

0 Members and 1 Guest are viewing this topic.

dubb

  • Swamp Rat
  • Posts: 1105
How to update a block with entmod
« 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.

Grrr1337

  • Swamp Rat
  • Posts: 812
Re: How to update a block with entmod
« Reply #1 on: January 13, 2017, 04:19:06 PM »
Try adding this line:
Code: [Select]
(command "_.ATTSYNC" "S" en1 "Y")
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg

dubb

  • Swamp Rat
  • Posts: 1105
Re: How to update a block with entmod
« Reply #2 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.

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: How to update a block with entmod
« Reply #3 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.