Jump to content

Boundary then hatch


Jhun Gonzalo

Recommended Posts

Hi to all,

 

Good day to all:D is there any of those have a Route that will create a boundary using polyline picking the side areas to fill. and then automatically select the boundary by filling a hatch, (creating boundary then hatch in one command) and then the boundary will delete when already filled the area of hatch.

 

Due to big file and irregular shapes of area to be hatch when i pick it it will read longer and some time hang, so i will create a boundary creating in close polyline (using line and arc) to be hatch, is this possible to combined in one command only, please provide me if u have route on this :roll: Thanks

 

Regards,

JG

Link to comment
Share on other sites

just a sample command no need lisp..type bo and enter..and pick in the middle of the object and walah..polyline created....i'm not familiar with coding i'm just only a coding user.

Link to comment
Share on other sites

Nope.,:shock: sometimes we have to create polyline to an areas that to be hatch because if we pick it the hatch direct to the plans it will analyzing the area to long or you will pick to many areas and sometimes hang on it,

 

ill show you a plan its to big dwg file almost 1.5 mb so i just post it to jpg, i created a polyline sorrounding the areas to be hatch (red line)

 

previously i was creating a closed polyline areas and then bhatch sellect the closed polyline created to be hatch and that's it, but i just realized how about to combined polyline and hatch in one command when i create a inclose polyline it will automatically create a hatch :P is this possible Thanks..

flplangro.jpg

Link to comment
Share on other sites

Well I suppose this would be the simplest way to combine them:

 

(defun c:plyhat (/ *error* oldcmd ply)
 (vl-load-com)

 (defun *error* (msg)
   (if oldcmd (setvar "CMDECHO" oldcmd))
   (if (not (member msg '("Function cancelled"
                          "quit / exit abort")))
     (princ (strcat "\n<< Error: " msg " >>"))
     (princ "\n<< Cancelled >>"))
   (princ))

 (setq oldcmd (getvar "CMDECHO"))
 (setvar "CMDECHO" 0)
 
 (command "_pline")
 (prompt "\nConstruct Polyline...")
 (while (eq 1 (logand 1 (getvar "CMDACTIVE")))
   (command pause))
 (vla-put-Closed
   (vlax-ename->vla-object (setq ply (entlast))) :vlax-true)
 (command "-bhatch" "_S" ply "" "")
 (princ))

Link to comment
Share on other sites

  • 1 year later...

It's never an older thread, because I'm new here and eager to learn more about cad, I'm browsing everything to find solutions for older problems that I've been encounter in my years of drawing, and to find new tricks, anyway, thanks a lot in advance for the future tricks I'm going to learn here.

Link to comment
Share on other sites

I just find it funny to see how I used to write code :)

It's really quite entertaining when someone digs up an old thread, such as this one.

Link to comment
Share on other sites

It's really quite entertaining when someone digs up an old thread, such as this one.

 

Exactly - I now realise how ugly my old code formatting style was...

Link to comment
Share on other sites

Lee,

Use CAD2002 and I am getting the following error message when I try to change the hatch pattern after PLYHAT:

 

Command: '_matchprop

Select source object:

Current active settings: Color Layer Ltype Ltscale Lineweight Thickness

PlotStyle Text Dim Hatch

Select destination object(s) or [settings]: Specify opposite corner:

Destination object's hatch properties could not be updated.

Link to comment
Share on other sites

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