Results 1 to 3 of 3

Thread: hatch by selecting boundary points

  1. #1
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default hatch by selecting boundary points

    I have this program working ok, but I would like to eliminate the final two prompts that appear after the area being selected is complete
    Code:
    (defun c:hatchpoints (/)
      (command "-hatch"
           "p"
           "solid"
           "w"
           ""
           (while (>= (getvar "cmdactive") 1)
             (command PAUSE)
           ) ;_ end of while
      ) ;_ end of command
    ) ;_ end of defun
    (defun c:hp (/)
      (c:hatchpoints)
    ) ;_ end of defun
    as of right now, after you close a hatch area, the command still prompts for 2 more answers, I would like to have them be completed on their own. Or, would it be better to prompt the user for points, create a list, then pass the list to the command?

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: hatch by selecting boundary points

    Here is one way...

    Code:
    
    (defun c:foo ( /b)
      (command "._pline")
      (while (>= (getvar "cmdactive") 1)
             (command PAUSE)
      )
      (command "._HATCH" "_P" "SOLID" "_S" (setq b (entlast)) "")
      (entdel b)
      (princ)
    )
    
    
    R.K. McSwain | CAD Panacea |

  3. #3
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: hatch by selecting boundary points

    thank you very much, that will make creating hatches much easier, at least until the boundary selection improves.

Similar Threads

  1. Replies: 9
    Last Post: 2008-09-16, 03:24 PM
  2. Replies: 0
    Last Post: 2008-02-27, 10:08 PM
  3. Selecting Associative Hatch also selects Hatch Boundary
    By gadjet in forum AutoCAD General
    Replies: 4
    Last Post: 2006-08-11, 07:14 PM
  4. Hatch Boundary deletes if Hatch Pattern is deleted
    By Merlin in forum AutoCAD General
    Replies: 2
    Last Post: 2006-04-23, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •