Author Topic: Help about print hatch in block!  (Read 5003 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Help about print hatch in block!
« Reply #15 on: December 22, 2010, 11:34:56 AM »
And Lee is correct about the dxf code not being there is the color of an entity is ByLayer.  You will have to put it in the dxf code list like he shows.

Thanks Tim, I completely overlooked the original request with my explanations...  :oops:

duyhung

  • Guest
Re: Help about print hatch in block!
« Reply #16 on: December 22, 2010, 12:41:11 PM »
Thanks all.
Hey I don't know much about advance lisp. I write lisp as beginner, apload and run lisp. Can you give me one complete lisp?
In my country it's 0 hour 37 minutes. When you are working I'm sleep  :-)
Thanks!

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Help about print hatch in block!
« Reply #17 on: December 22, 2010, 12:54:58 PM »
Usually we help, we don't give, but since you are new here, here is a complete lisp.

Code: [Select]
(defun c:ChangeHatchColor ()

    (vl-load-com)
    (vlax-for blk (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-Acad-Object)))
        (vlax-for i blk
            (if (= (vla-get-ObjectName i) "AcDbHatch")
                (vla-put-Color i 250)
            )
        )
    )
    (command "_.regenall")
    (princ)
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

duyhung

  • Guest
Re: Help about print hatch in block!
« Reply #18 on: December 22, 2010, 01:02:24 PM »
Thanks Tim I know and I'll study more about lisp!.

pBe

  • Bull Frog
  • Posts: 402
Re: Help about print hatch in block!
« Reply #19 on: December 23, 2010, 12:45:54 AM »
Hence the 2nd post

plain and simple  :-)
and it works
except the nested part of course:


« Last Edit: December 23, 2010, 12:54:57 AM by pBe »