Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
pbejse
Posts: 2,459
Registered: ‎11-24-2009
Message 11 of 13 (159 Views)

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)
  )

 

Distinguished Contributor
msarqui
Posts: 127
Registered: ‎09-14-2010
Message 12 of 13 (144 Views)

Re: "Hatch to back" reactor

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

It works like a charm.

 

Thanks pbejse!

*Expert Elite*
pbejse
Posts: 2,459
Registered: ‎11-24-2009
Message 13 of 13 (124 Views)

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

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.