msarqui wrote:It is possible to do this in model and paper space at the same time? Like in on shot? Thanks!
It is possible to do this in model and paper space at the same time? Like in on shot?
Not one shot but sorta
(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))
(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)
It works like a charm.
msarqui wrote:It works like a charm. Thanks pbejse!
Glad it works for you msarqui
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.