Author Topic: How to get the hatch loop?  (Read 1762 times)

0 Members and 1 Guest are viewing this topic.

guohq

  • Newt
  • Posts: 84
How to get the hatch loop?
« on: June 18, 2014, 10:39:17 PM »
Code: [Select]
(setq hat (vlax-ename->vla-object (car (entsel))))
(vla-getloopat hat 0  'LoopEnts)

if the property AssociativeHatch of hatch is false , LoopEnts will be nothing.

how can I get the loop when AssociativeHatch property is false?

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: How to get the hatch loop?
« Reply #1 on: June 19, 2014, 04:17:25 AM »
If a hatch in non-associative there are obviously no entities that make up the loops. But the hatch itself does hold information about its outlines. Just look at the entitylist of the hatch. This information is used by the _HATCHGENERATEBOUNDARY command for example. For a Lisp function that does the same you can look here: http://www.jtbworld.com/lisp/hatchb.htm.