Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
2,535 Posts
306 Kudos
Registered: ‎11-24-2009
Post 11 of 13

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
141 Posts
0 Kudos
Registered: ‎09-14-2010
Post 12 of 13

Re: "Hatch to back" reactor

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

It works like a charm.

 

Thanks pbejse!

*Expert Elite*
2,535 Posts
306 Kudos
Registered: ‎11-24-2009
Post 13 of 13

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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!