Author Topic: Create a hatch with multple area region  (Read 396 times)

0 Members and 1 Guest are viewing this topic.

pingoo666

  • Mosquito
  • Posts: 13
Create a hatch with multple area region
« on: January 05, 2024, 08:57:18 AM »
Hello and happy new year !

I try to create a hatch with a region for outer loop.

I use this method :

Code: [Select]
(vla-appendouterloop hobj
        (vlax-make-variant
            (vlax-safearray-fill
                (vlax-make-safearray vlax-vbobject '(0 . 0))
                (list obj1)
            )
        )
    )

The code works like a charm except if the region has multiple areas

any ideas ?

ribarm

  • Gator
  • Posts: 3255
  • Marko Ribar, architect
Re: Create a hatch with multple area region
« Reply #1 on: January 05, 2024, 10:42:02 AM »
1. explode REGION with multiple areas
2. recreate multiple REGIONS with REGION command by using (ssget "_P") right after explode applied
3. use (ssget "_A" '((0 . "REGION") (8 . "layernamewhereresideregions"))) to acquire sel. set of reference regions
4. iterate througn sel. set and apply your sub for hatching on every item stored in sel. set
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube