Convert a Hatch to a Polyline

Convert a Hatch to a Polyline

timothy_crouse
Collaborator Collaborator
1,113 Views
16 Replies
Message 1 of 17

Convert a Hatch to a Polyline

timothy_crouse
Collaborator
Collaborator

Does anyone have a lisp to convert a hatch to a set of polylines?

 

I need to convert hatch patterns to polylines which I then apply object lineweights to.  Once that task is complete the set of polylines will be turned into a block.

 

It's a bit tedious performing this task manually.

 

Thank in Advance

-Tim C.

 

0 Likes
1,114 Views
16 Replies
Replies (16)
Message 2 of 17

pendean
Community Legend
Community Legend

Do you just need to use a plotstyle table setting for your hatches?

 

Manually? like you use EXPLODE command then use MPEDIT command, then BLOCK command?

Message 3 of 17

paullimapa
Mentor
Mentor

Any particular reason why the objects cannot just stay as LINES after a HATCH pattern is exploded and then you just give those LINES lineweights? What's the purpose of converting them to PLINES?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 17

john.uhden
Mentor
Mentor

@timothy_crouse 

That's silly.

If you use a .CTB then just change the color of the hatch to a wider pen.

I just tried it and it works.

John F. Uhden

0 Likes
Message 5 of 17

timothy_crouse
Collaborator
Collaborator

Dealing with multiple details of varying scales.  All the objects are in Paperspace.  This is part of working through a process that can be managed / Re-used without customizing the lineweight list or creating a one-off plot configuration file.

 

I understand there are multiple ways to skin this cat.  Placing details in a viewport is not an option.  When completed these details are to be wrapped up into a block with all objects and annotations.

 

-Tim

0 Likes
Message 6 of 17

timothy_crouse
Collaborator
Collaborator

The lineweight list does not have the lineweights needed for this task.

0 Likes
Message 7 of 17

paullimapa
Mentor
Mentor

what additional lineweights are you referring to?

the ones for LINES as well as PLINES are the same:

paulli_apa_0-1661900638401.png

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 8 of 17

Kent1Cooper
Consultant
Consultant

@timothy_crouse wrote:

... convert hatch patterns to polylines which I then apply object lineweights to.  ....


Clarify:  You really mean "apply Polyline width to," rather than "object lineweights," which a latter Message says won't do.  [Lineweight and width are not the same thing, and are also both different from thickness.]  Is that right?  If so, the Explode/Mpedit/Block approach could certainly be automated.

 

[MPEDIT is an Express Tool.  If you want a true AutoCAD command, which presumably would be what a custom command would use, you can use PEDIT and its Multiple option.]

Kent Cooper, AIA
0 Likes
Message 9 of 17

Kent1Cooper
Consultant
Consultant

And be aware of the difference between end shapes:

Kent1Cooper_0-1661909163446.png

If whatever forms the Hatch boundary is also equally or more wide/weighty, it won't matter.

Kent Cooper, AIA
0 Likes
Message 10 of 17

paullimapa
Mentor
Mentor

and at very tight angles plines with width don't turn corners cleanly.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 11 of 17

Kent1Cooper
Consultant
Consultant

@paullimapa wrote:

and at very tight angles plines with width don't turn corners cleanly.


That won't matter in this case -- an Exploded Hatch is always just independent Lines.

Kent Cooper, AIA
0 Likes
Message 12 of 17

paullimapa
Mentor
Mentor

that's true as long as the segments are not joined...but once a segment meets at a corner with another and pline width is applied, you can end up with the outer corner not having any width or equal width to the 2 independent pline segments that form that corner angle.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 13 of 17

paullimapa
Mentor
Mentor

I'm really curious as to how you plan on dealing with the other remaining objects besides HATCHES like LINES, ARCS, TEXTS, DIMENSIONS, LEADER ARROWS and etc. that make up the details. If you are not going to rely on the CTB file to be able to replicate the same weight when printing them in the future, how can you guarantee those other object line widths can be preserved?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 14 of 17

timothy_crouse
Collaborator
Collaborator

objects that require a predefined line weight will be converted to a line and have a global width applied.  Plot style that uses the object lineweight will be applied here (to the object).

 

All the objects that can be assigned line weights from the lightweight list will have those line weights applied via the properties picklist.

 

The annotation will be set to bylayer

 

There will be many unique object line weights.  This task has to do with setting up masks for chip-level fabrication.  this is not a typical construction detail.

 

Exploding hatches and converting the PLines was an option that I wished to explore.  Performing the task manually is a bit labor intensive which is why I was asking if anyone had a lisp.

 

Other options are being explored as well.  The use of multiple plot configuration files may be a good solution.  It does save a lot of time once default templates are set up.

 

Best Regards

-Tim C.

 

 

 

 

0 Likes
Message 15 of 17

paullimapa
Mentor
Mentor

Since you're making so many changes to the drawing details, I would keep a copy of the original. Because after these changes you're proposing have been made, it would be very difficult for using these as workable CAD files in the future. One additional caveat with keeping everything in paper space (since you're avoiding the use of vports) is that you will not be able reference this drawing into another since references only recognize objects drawn in model space.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 16 of 17

ronjonp
Advisor
Advisor

@timothy_crouse Do you have a before and after drawing that you could share? Reading through this thread and I'm still confused as to why this is necessary?

0 Likes
Message 17 of 17

Sea-Haven
Mentor
Mentor

Agree with you even images would help.

 

Are we talking get hatch boundary, explode, get objects within boundary, then make into plines with a width.

0 Likes