Author Topic: separate hatches  (Read 4391 times)

0 Members and 1 Guest are viewing this topic.

Peter Guappa

  • Guest
separate hatches
« on: March 12, 2015, 05:30:02 PM »
I have many drawings with hatches that are created with the 'Create separate hatches'-toggle unchecked.
How can I separate these hatches in LISP?
With the HATCHEDIT command I can do it for each hatch, but I want to use a LISP that separates all hatches in the drawing.
Suggestions?
Thx

(Bricscad v15)

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Re: separate hatches
« Reply #1 on: March 13, 2015, 12:20:24 PM »
Try, but I am not sure for BricsCAD...

Code: [Select]
(defun c:sepselhatches ( / ss i ent )
  (setq ss (ssget "_:L" '((0 . "HATCH"))))
  (repeat (setq i (sslength ss))
    (setq ent (ssname ss (setq i (1- i))))
    (command "_.-HATCHEDIT" ent "H")
  )
  (princ)
)
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Peter Guappa

  • Guest
Re: separate hatches
« Reply #2 on: March 13, 2015, 02:35:09 PM »
Thanks,
But unfortunately it doesn't work in Bricscad.

These are the options in BC:

Select hatch entity:
Enter hatch option [Disassociate/ADd boundaries/Remove boundaries/ASsociate]:
« Last Edit: March 13, 2015, 02:40:01 PM by Peter Guappa »

xdcad

  • Bull Frog
  • Posts: 493
Re: separate hatches
« Reply #3 on: December 18, 2023, 11:54:38 AM »
The code I wrote uses XDRX-API,which can be downloaded from github.com and is updated at any time.
===================================
https://github.com/xdcad
https://sourceforge.net/projects/xdrx-api-zip/
http://bbs.xdcad.net

danAllen

  • Newt
  • Posts: 133
Re: separate hatches
« Reply #4 on: December 18, 2023, 12:34:11 PM »
I have BC v15, and use the same technique for fixing unassociative hatches. I just isolate the hatches with ISOLATEOBJCTS, recreate the hatch boundary and rehatch. https://jtbworld.com/autocad-hatchb-lsp