Author Topic: Corrupted hatch in dynamic blocks  (Read 1342 times)

0 Members and 1 Guest are viewing this topic.

NICK_VNV

  • Newt
  • Posts: 63
Corrupted hatch in dynamic blocks
« on: June 04, 2014, 08:46:19 AM »
When I insert dynamic blocks with associated hatch inside some of them have corrupted hatch (and it goes normal if I change any grip which affect boundary of hatch). If drawing contains many such blocks it becomes hard to fix them all manually, so i wrote a lisp to update all their subents and regen the drawing. Also I noticed double regen is required to see the result. Here is my version
Code: [Select]
    (defun c:block_hatch_fix ()
    (vl-load-com)
    (princ "\nStart..")
    (vlax-for blk (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-Acad-Object)))
        (vlax-for obj blk
                (vlax-invoke-method obj 'Update)
        )
    )
    (command "_.regenall")
    (command "_.regenall")
    (princ "\nComplete")
    (princ)
)
Maybe somebody find this usefull or can improve the code.
Sorry for my English...

kpblc

  • Bull Frog
  • Posts: 396
Re: Corrupted hatch in dynamic blocks
« Reply #1 on: June 05, 2014, 01:13:11 AM »
Maybe problem appears because you hatches are associative.
Sorry for my English.