See the top rated post in this thread. Click here

Results 1 to 8 of 8

Thread: AutoHatch LISP

  1. #1
    Member
    Join Date
    2013-02
    Posts
    49
    Login to Give a bone
    0

    Default AutoHatch LISP

    Good day!

    Could you please help me create a routine to create Hatch automatically.

    For example:

    Solid Hatch Pattern

    Instead of typing H command and then select a hatch pattern.

    I will just enter H1 (Code) for solid hatch pattern and then click or select area directly. Without opening the hatch dialog box.

    H2 for Net hatch pattern so on and so forth.

    Thank you in advance.

  2. #2
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: AutoHatch LISP

    Hi,

    Instead of codes, you can open the palette via ctrl+3 and from there you can hit the desired hatch pattern then pick a point in the target closed area on the screen.

  3. #3
    Member
    Join Date
    2013-02
    Posts
    49
    Login to Give a bone
    0

    Default Re: AutoHatch LISP

    Hi Tharwat,

    Thank you for your time & suggestion. But I am more comportable typing commands.

    I do appreciate your suggestion.

    Hope you can help me on this.

  4. #4
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    1

    Default Re: AutoHatch LISP

    Simply this:
    Code:
    (command "_.-hatch" "P" "Solid" "\\" "")

  5. #5
    Member
    Join Date
    2013-02
    Posts
    49
    Login to Give a bone
    0

    Default Re: AutoHatch LISP

    Hi Tharwat

    It works very well!

    One more thing, could you please revised it so I can pre-set each routine properties to the following below:

    Annotative = Yes
    Angle =
    Scale =
    Associative = No
    Background Color =

    Thank you so much for always helping me. You helped me couple of times.
    Last edited by ELIANDEFI; 2018-05-14 at 07:28 AM.

  6. #6
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    1

    Default Re: AutoHatch LISP

    Can you do all of those things from the command line? Do you know the keys to press to do those? You can adjust the code Tharwat posted to suit your needs. To add additional options to the code, enclose each typed set of keys within quotation marks ("). For Annotative, you would add this to his code.
    Code:
    (command "_.-hatch" "P" "Solid" "AN" "Y" "\\" "")
    Try the -hatch command to see what command line options are available. To allow for user input, use the pause option in place of your request for user input.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  7. #7
    Member
    Join Date
    2013-02
    Posts
    49
    Login to Give a bone
    0

    Default Re: AutoHatch LISP

    Hi Opie

    I tried what you said but its not working & I can't figure out how.

    Could you help me fix the routine below:

    (Defun C:NET () (command "_.-hatch" "P" "NET" "AN" "Y" "LA" "L-Hatch" "ANGLE" "0" "Scale" "10" "Associative" "N" "Background Color" "253" "\\" ""))

    Thank you so much
    Last edited by ELIANDEFI; 2018-05-21 at 04:43 AM.

  8. #8
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: AutoHatch LISP

    When you type all of those items within each set of quotation marks, what happens? Where does it fail?

    Unless you are specifying the Solid hatch type, then you must answer the scale and angle prompts when changing the hatch pattern name.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Similar Threads

  1. Help with autolisp (2 lisp programs in one lisp execution)
    By javier-perez1956746375 in forum AutoLISP
    Replies: 1
    Last Post: 2017-06-15, 07:40 PM
  2. Replies: 13
    Last Post: 2014-01-20, 06:14 PM
  3. Replies: 3
    Last Post: 2012-05-07, 08:16 PM
  4. Replies: 9
    Last Post: 2012-01-21, 07:58 AM

Posting Permissions

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