luiscarneirorm Posted September 26, 2011 Posted September 26, 2011 is possible with some function autolisp, select the Hatch boundaries??? Quote
Lt Dan's legs Posted September 26, 2011 Posted September 26, 2011 (ssget '((-4 . "<NOT")(0 . "HATCH")(-4 . "NOT>"))) Is this what you're looking for? Quote
luiscarneirorm Posted September 26, 2011 Author Posted September 26, 2011 (ssget '((-4 . "<NOT")(0 . "HATCH")(-4 . "NOT>"))) Is this what you're looking for? No... I want to select, just the boundaries(if they exist) of the hatch entities. Quote
Lt Dan's legs Posted September 26, 2011 Posted September 26, 2011 Than this? ( (lambda ( ss ) (if ss (sssetfirst nil ss) ) )(ssget '((0 . "hatch"))) ) Quote
GP_ Posted September 26, 2011 Posted September 26, 2011 Boundary Path Data http://docs.autodesk.com/ACD/2011/ENU/filesDXF/WS1a9193826455f5ff18cb41610ec0a2e719-7a11.htm Quote
Lt Dan's legs Posted September 26, 2011 Posted September 26, 2011 (if (ssget "_:s" '((0 . "hatch"))) (progn (vlax-for x (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object) ) ) (vla-getloopat x 0 'loop) ) (if (eq (type loop) 'safearray) (setq loop (vlax-safearray->list loop)) ) ) ) Quote
GP_ Posted September 26, 2011 Posted September 26, 2011 (if (ssget "_:s" '((0 . "hatch"))) (progn (vlax-for x (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object) ) ) (vla-getloopat x 0 'loop) ) (if (eq (type loop) 'safearray) (setq loop (vlax-safearray->list loop)) ) ) ) Simple solution if the exact boundary (if no boundary objects spline/ellipse) (command "_-hatchedit" pause "_B" "_P" "_N") (setq A (entlast)) Quote
luiscarneirorm Posted September 26, 2011 Author Posted September 26, 2011 Thanks for the answers. I can only test in the office tomorrow. Quote
irneb Posted September 27, 2011 Posted September 27, 2011 Is the hatch associative and you're trying to select the entities which are the source of the boundary? If so then you can check the PickStyle=2 setting (Options dialog -> Selection tab -> Selection Modes (Associative Hatch) bottom left). Then Lt Dan's legs' 1st idea should work perfectly. Quote
luiscarneirorm Posted September 27, 2011 Author Posted September 27, 2011 I need to automatically select all the limits of the hatch, and swap them for a particular layer. I found a function that recreates the limits of my hatch in layer I want, but then need to remove the ancient landmark. Is there any way to run the "overkill" or a similar function, I eliminate duplicate entities if they are in different layers? I insert 2 files, the hatch1 it's the original, and the hatch2 it's my goal. I think this way is more noticeable. hatch2.dxf hatch1.dxf Quote
luiscarneirorm Posted September 29, 2011 Author Posted September 29, 2011 sorry for the lack of patience, but someone can help me? I really needed this function for my work Quote
irneb Posted September 29, 2011 Posted September 29, 2011 I don't think it's possible, or at least EXTREMELY difficult. Not if the hatches are done as per your attachment. If they were associative there'd've been a link to the boundary objects which would be possible to use for selecting them. Due to the hatches being non-associative, there is no link. Thus you could try recreating the boundaries as polylines / regions through the hatchedit command and then try to find similar linework. Though that's also very difficult, since a hatch may have been made using pick-points - in which case the boundary may only be a portion of the entity. So it's an even more involved process than what happens inside OverKill to figure out where these entities are. Quote
luiscarneirorm Posted September 29, 2011 Author Posted September 29, 2011 I also have the idea that it is quite complex. what I do at the moment is to run a function that recreates all the Hatch boundaries in a new layer, after i turn off this layer and i select the hatch's and the boundaries (if exist) manually to delete them... P.S: With the routines in this and other forums i have managed to reduce a job that took about 3 or 4 hours to 15 or 20 minutes, but I needed this function, and one or two more, to complete the automation of this process, and remove the human errors... Quote
pBe Posted September 29, 2011 Posted September 29, 2011 Be patient Luis -Good things happen to those who wait- Quote
alanjt Posted September 29, 2011 Posted September 29, 2011 http://www.jtbworld.com/lisp/hatchb.htm Quote
luiscarneirorm Posted September 29, 2011 Author Posted September 29, 2011 something like this?[ATTACH=CONFIG]30294[/ATTACH] No... if my HATCH's were that way I would have no problem, my problem is that some hatch's have the boundaries, but not associated with the hatch, i think if you check my files in the post #10 you understand my goal... Quote
irneb Posted September 29, 2011 Posted September 29, 2011 Yes well, that's the normal recreate hatch boundary, as explained by GP_ in post #7. AFAICT the OP wants to select the original entities which formed the boundary. He doesn't want "new" boundary entities, he wants the originals. See the 2 DXFs in the OP's post #10. It seems as a 2nd option alternative he'd be willing to accept getting rid of the originals after recreating the boundary ... i.e. as if he's run an OverKill after the boundary recreate. Quote
luiscarneirorm Posted September 29, 2011 Author Posted September 29, 2011 http://www.jtbworld.com/lisp/hatchb.htm Yes, I am using this function to recreate the boundaries, but my problem it's delete the old boundaries when they are. Yes well, that's the normal recreate hatch boundary, as explained by GP_ in post #7. AFAICT the OP wants to select the original entities which formed the boundary. He doesn't want "new" boundary entities, he wants the originals. See the 2 DXFs in the OP's post #10. It seems as a 2nd option alternative he'd be willing to accept getting rid of the originals after recreating the boundary ... i.e. as if he's run an OverKill after the boundary recreate. exactly... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.