Jump to content

how to select the Hatch boundaries


Recommended Posts

Posted

is possible with some function autolisp, select the Hatch boundaries???

 

hatch_limit.jpg

Posted

(ssget '((-4 . "<NOT")(0 . "HATCH")(-4 . "NOT>")))

 

Is this what you're looking for?

Posted
(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.

Posted

Than this?

 
(
 (lambda ( ss )
   (if ss
     (sssetfirst nil ss)
   )
 )(ssget '((0 . "hatch")))
)

Posted
 
(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))
   )
 )
)

Posted
 
(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))
)
)
)

 

 

finger002.gif

 

 

 

Simple solution if the exact boundary

(if no boundary objects spline/ellipse)

 

 

(command "_-hatchedit" pause "_B" "_P" "_N")

(setq A (entlast))

 

500.jpg

Posted

Thanks for the answers.

I can only test in the office tomorrow.:D

Posted

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.

Posted

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

Posted

sorry for the lack of patience, but someone can help me?

I really needed this function for my work

:cry:

Posted

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.

Posted

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...

Posted

Be patient Luis ;)

 

-Good things happen to those who wait-

Posted
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...

Posted

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.

Posted

 

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...

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...