See the top rated post in this thread. Click here

Page 5 of 7 FirstFirst 1234567 LastLast
Results 41 to 50 of 62

Thread: Dhatch (Dynamic Hatch Tool)

  1. #41
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Dhatch (Dynamic Hatch Tool)

    Quote Originally Posted by kozmosovia View Post
    Till now, I m considering to enhance DynamicHatch for DCL icon display/select patterns and may program on a Dynamic way to Measure/Divide on curves for the next step after I finished DynamicArray.
    Maybe this is not that difficult ... a simple DCL with a list box containing all the pattern names is sufficient. Place an action on the list box & every time the user changes the selection in the listbox, update the hatch as a preview.

  2. #42
    Active Member
    Join Date
    2007-04
    Posts
    50
    Login to Give a bone
    0

    Default Re: Dhatch (Dynamic Hatch Tool)

    Quote Originally Posted by irneb View Post
    Maybe this is not that difficult ... a simple DCL with a list box containing all the pattern names is sufficient. Place an action on the list box & every time the user changes the selection in the listbox, update the hatch as a preview.
    Yes, that is good idea and I will take it. thanks.
    Later I will work on that.

  3. #43
    I could stop if I wanted to
    Join Date
    2005-09
    Location
    Canada
    Posts
    214
    Login to Give a bone
    0

    Default Re: Dhatch (Dynamic Hatch Tool)

    Dhatch 4.5

    I have made some tests and play with MTEXT.
    so i've decided to add MTEXT as a Dynamic Menu and allow user to play with.

    You will see on this animated GIF the MTEXT entity changing Dynamicly
    (Font and Text color when activate or not.) and following the
    Grdraw line color changing from Red to blue when the option is activated
    I've forced the ARIAL font to have a good text looking.

    To select press SPACEBAR
    To Activate the option press Enter
    you can Switch Pattern by pressing TAB or Shift+TAB (reverse)

    you can move your mouse to update Dynamicly the Hatch or...
    press "V" at anytime to enter any Value for Angle, scale, rotation, Origin (as list), and even Pattern Name.

    Dhatch create a List of all available Hatch Pattern on Acadiso.pat or acad.pat depending the
    Measurement variable. All custom Hatch Pattern Found will be added to this list.

    Hatch will be Associated if entity is selected.

    By playing with MTEXT....This give me an Idea (just for test)..
    Create Dynamic Menu with DropDown who can read XML files..(eg *.cui)
    But time is missing a bit here....and i'm not that familar to XML.
    so if someone is interested...I'm curious to see.

    any comment will be appreciated.



    (file updated 22 Jan 2009)
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by andrea.andreetti; 2009-01-22 at 10:20 PM.

  4. #44
    Active Member
    Join Date
    2007-04
    Posts
    50
    Login to Give a bone
    0

    Default Re: Dhatch (Dynamic Hatch Tool)

    Waw, it is nice upgrade. much more nicer performance by using MTEXT with background.
    you always have ideas beyond the common direction.

    I will consider to add such feature in the new DynamicArray programming.

  5. #45
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Dhatch (Dynamic Hatch Tool)

    Just a query, why not use a "right-click" instead? See this code, with a mouse right-click a pop-up appears at the cursor showing the different options:
    Code:
    (defun c:Test_GRRead (/ res pt1 pt2 stat)
      (setq pt1  (getPoint "Pick initial point: ")
            pt2  pt1
            res  t
            stat "Angle"
      ) ;_ end of setq
      (prompt "\nMove cursor, Right-click for menu or press key: ")
      (while res
        (setq res (grread t (+ 1 2 4 8) 0))
        (grtext -2 (strcat (rtos (distance pt1 pt2)) " << " (angtos (angle pt1 pt2))))
        (grtext -1 stat)
        (cond
          ((= (car res) 2) (alert (strcat "You've pressed the\n\"" (chr (cadr res)) "\" key.")))
          ((= (car res) 3) (alert (strcat "You've left clicked\n" (vl-princ-to-string res))))
          ((= (car res) 5)
           (redraw)
           (setq pt2 (cadr res))
           (grdraw pt1 pt2 2 1)
          )
          ((= (car res) 25)
           (setvar "DYNPROMPT" 1)
           (initget "Angle Scale Pattern Color File Exit")
           (setq stat (getkword (strcat "Select an Option [Angle/Scale/Pattern/Color/File/Exit] <" stat ">: ")))
           (if (= stat "Exit") (setq res nil))
          )
          (t (alert (strcat "Code\n" (itoa (car res)) "\n" (vl-princ-to-string res))))
        ) ;_ end of cond
      ) ;_ end of while
      (princ "\Closing.")
      (redraw)
      (princ)
    ) ;_ end of defun

  6. #46
    I could stop if I wanted to
    Join Date
    2005-09
    Location
    Canada
    Posts
    214
    Login to Give a bone
    0

    Default Re: Dhatch (Dynamic Hatch Tool)

    Quote Originally Posted by irneb View Post
    Just a query, why not use a "right-click" instead? See this code, with a mouse right-click a pop-up appears at the cursor showing the different options:
    Code:
    (defun c:Test_GRRead (/ res pt1 pt2 stat)
      (setq pt1  (getPoint "Pick initial point: ")
            pt2  pt1
            res  t
            stat "Angle"
      ) ;_ end of setq
      (prompt "\nMove cursor, Right-click for menu or press key: ")
      (while res
        (setq res (grread t (+ 1 2 4 8) 0))
        (grtext -2 (strcat (rtos (distance pt1 pt2)) " << " (angtos (angle pt1 pt2))))
        (grtext -1 stat)
        (cond
          ((= (car res) 2) (alert (strcat "You've pressed the\n\"" (chr (cadr res)) "\" key.")))
          ((= (car res) 3) (alert (strcat "You've left clicked\n" (vl-princ-to-string res))))
          ((= (car res) 5)
           (redraw)
           (setq pt2 (cadr res))
           (grdraw pt1 pt2 2 1)
          )
          ((= (car res) 25)
           (setvar "DYNPROMPT" 1)
           (initget "Angle Scale Pattern Color File Exit")
           (setq stat (getkword (strcat "Select an Option [Angle/Scale/Pattern/Color/File/Exit] <" stat ">: ")))
           (if (= stat "Exit") (setq res nil))
          )
          (t (alert (strcat "Code\n" (itoa (car res)) "\n" (vl-princ-to-string res))))
        ) ;_ end of cond
      ) ;_ end of while
      (princ "\Closing.")
      (redraw)
      (princ)
    ) ;_ end of defun
    thanks for the code...

    question:..
    Is there any way to get the ARROW key under the Delete Button ?

  7. #47
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Dhatch (Dynamic Hatch Tool)

    Quote Originally Posted by andrea.andreetti View Post
    thanks for the code...

    question:..
    Is there any way to get the ARROW key under the Delete Button ?
    Pleasure.

    Just checked. My code shows an alert if anything happens which is not catered for ... also an alert to show what key is pressed.

    Unfortunately the grread function doesn't read special keys, only those with an ASCII / Unicode. From my code I did notice if you hold down Ctrl+Up Arrow this gives an u with Diaresis (ü), but it only works while the Ctrl is depressed (Alt and Shift don't work this way). And also the Function keys F1 to F12 are only working in some cases.

    So stuff like arrows, or even function keys aren't read in grread. The only way I think this can be read is through VBA. Or maybe an ARX. If someone can write the ARX for this then you only need load it and call that function instead of grread. I think the VBA route would be a bit problematic as Lisp & VBA don't mix too well.

  8. #48
    I could stop if I wanted to CadDog's Avatar
    Join Date
    2005-06
    Location
    So Ca
    Posts
    439
    Login to Give a bone
    0

    Default Re: Dhatch (Dynamic Hatch Tool)

    Looks like a few people are have a lot of fun and working together...

    Great lead and team work guys...

    Please keep it up...



    This reminds me of a song...

    *****
    TAG TEAM BACK AGAIN...

  9. #49
    Active Member
    Join Date
    2007-04
    Posts
    50
    Login to Give a bone
    0

    Default Re: Dhatch (Dynamic Hatch Tool)

    Quote Originally Posted by irneb View Post
    .... I think the VBA route would be a bit problematic as Lisp & VBA don't mix too well.
    Agreed. Maybe an altered way is to define another set of direction keys such as using "W-ASD" as well as many PC games do. but of coz, that will not be very ferfect.

  10. #50
    Active Member
    Join Date
    2007-04
    Posts
    50
    Login to Give a bone
    0

    Default Re: Dhatch (Dynamic Hatch Tool)

    Upgraded version of DynamicHatch 1.5

    Dialog is provided to switch between valid hatch patterns, auto-load PAT file can also be set.

    Change hatch type between Gradient hatch and Common hatch
    Attached Files Attached Files

Page 5 of 7 FirstFirst 1234567 LastLast

Similar Threads

  1. Enhanced Hatch Tool for Tool Palettes
    By Wish List System in forum AutoCAD Wish List
    Replies: 3
    Last Post: 2014-05-12, 06:17 PM
  2. Hatch Multiple Areas with Tool Pallette Hatch
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2013-01-16, 04:51 AM
  3. dynamic block and hatch
    By Peter Sedlacek in forum Dynamic Blocks - Technical
    Replies: 1
    Last Post: 2009-02-20, 02:25 PM
  4. Dynamic ..... Hatch?
    By Rico in forum Dynamic Blocks - Technical
    Replies: 14
    Last Post: 2005-10-07, 07:34 PM
  5. Hatch an object with tool palette hatch
    By chuck_cantieny in forum AutoCAD General
    Replies: 1
    Last Post: 2004-06-17, 03:02 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
  •