• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    *Expert Elite*
    Posts: 2,057
    Registered: ‎11-24-2009

    Re: "Hatch to back" reactor

    02-16-2013 02:11 AM in reply to: msarqui

    msarqui wrote:


    It is possible to do this in model and paper space at the same time? Like in on shot?

     

    Thanks!


    Not one shot but sorta :smileyhappy:

     

    (defun c:HatchBack  (/ HatchColl Dict sorttable)
      (vlax-for layout  (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
        (setq HatchColl nil
              Dict      (vla-getextensiondictionary layout))
        (if (vl-catch-all-error-p
              (setq sorttable (vl-catch-all-apply 'vla-item (list dict "ACAD_SORTENTS"))))
          (setq sorttable (vla-addObject dict "ACAD_SORTENTS" "AcDbSortentsTable")))
        (vlax-for itm  layout
          (if (eq (vla-get-objectname itm) "AcDbHatch")
            (setq HatchColl (cons itm HatchColl))))
        (and HatchColl (vlax-invoke sorttable 'MoveToBottom HatchColl)
             )
        )(princ)
      )

     

    Please use plain text.
    Valued Contributor
    msarqui
    Posts: 87
    Registered: ‎09-14-2010

    Re: "Hatch to back" reactor

    02-18-2013 05:29 PM in reply to: pbejse

    It works like a charm.

     

    Thanks pbejse!

    Please use plain text.
    *Expert Elite*
    Posts: 2,057
    Registered: ‎11-24-2009

    Re: "Hatch to back" reactor

    02-19-2013 08:12 PM in reply to: msarqui

    msarqui wrote:

    It works like a charm.

     

    Thanks pbejse!


    Glad it works for you msarqui

     

    Cheers

    Please use plain text.