Is it possible to remove vertices from a hatch with lisp?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm writing a lisp function that will include removing hatch vertices, but I'm having some trouble. With a polyline you can remove a vertex and the other associated entries from the object's entities and then entmod. That doesn't work with a hatch. In fact, a hatch's entities list seems like it can be a couple different ways. If the hatch was made by selecting an object, then the sides between vertices (for lines only, arcs are quite different) are listed with a (72 . 1) then a DXF code 10 point and DXF code 11 point. If the hatch was made by selecting a point, then the vertices are listed as a series of DXF code 10 points. My thinking was if I removed the appropriate items from the list of entities and then ran entmod on that new list, the hatch would update without the removed vertex/vertices. But this doesn't happen. Instead I just get a return of nil. Is there a way to actually do this by entmodding?
I've tried a couple other ways, including recreating the hatch boundary, modding that pline, then disassociating the hatch and deleting the pline. But if the hatch has multiple boundaries, or any internal islands, it all falls apart as multiple plines are recreated and it just becomes a big giant mess. So I'm hoping there's another way I can do this an easier way.