Results 1 to 5 of 5

Thread: Routine to globally set all hatches to non associative?

  1. #1
    AUGI Addict Mr Cory's Avatar
    Join Date
    2007-01
    Location
    Under a Rock over there
    Posts
    1,006
    Login to Give a bone
    0

    Default Routine to globally set all hatches to non associative?

    Does anyone have a routine to globally set all hatches to non associative?

    Cheers Cory

  2. #2
    Active Member
    Join Date
    2003-11
    Location
    YUL
    Posts
    75
    Login to Give a bone
    0

    Default Re: Routine to globally set all hatches to non associative?

    Quote Originally Posted by Mr Cory
    Does anyone have a routine to globally set all hatches to non associative?

    Cheers Cory
    I have this:
    Code:
    (defun c:qass (/ ss sl ct e1)
      (command "cmdecho" (getvar "cmdecho"))
      (if (setq ss (ssget '((0 . "HATCH") (71 . 1))))
        (setq sl (sslength ss)
    	  ct (- sl 1)
        )
        (princ "\n No associative hatch found! ")
      )
      (if ss
        (repeat sl
          (setq e1 (entget (ssname ss ct)))
          (entmod (subst (cons 71 0) (assoc 71 e1) e1))
          (setq ct (- ct 1))
        )
      )
      (princ)
    )
    (prompt "\n Type > qass < to remove hatch associativities: ")

  3. #3
    AUGI Addict Mr Cory's Avatar
    Join Date
    2007-01
    Location
    Under a Rock over there
    Posts
    1,006
    Login to Give a bone
    0

    Default Re: Routine to globally set all hatches to non associative?

    Thats exactly what i was after Thanks Paul!

    Just one thing, where and what would i add to make it do it automatically?

  4. #4
    Active Member
    Join Date
    2003-11
    Location
    YUL
    Posts
    75
    Login to Give a bone
    0

    Default Re: Routine to globally set all hatches to non associative?

    You are welcome.

    This will select and process all associated hatches automatically.

    Code:
    (defun c:qass (/ ss sl ct e1)
      (command "cmdecho" (getvar "cmdecho"))
      (if (setq ss (ssget "_x" '((0 . "HATCH") (71 . 1))))
        (setq sl (sslength ss)
    	  ct (- sl 1)
        )
        (princ "\n No associative hatch found! ")
      )
      (if ss
        (repeat sl
          (setq e1 (entget (ssname ss ct)))
          (entmod (subst (cons 71 0) (assoc 71 e1) e1))
          (setq ct (- ct 1))
        )
      )
      (princ)
    )
    (prompt "\n Type > qass < to remove hatch associativities: ")

  5. #5
    AUGI Addict Mr Cory's Avatar
    Join Date
    2007-01
    Location
    Under a Rock over there
    Posts
    1,006
    Login to Give a bone
    0

    Default Re: Routine to globally set all hatches to non associative?

    Perfect thanks again!

Similar Threads

  1. Replies: 4
    Last Post: 2017-01-05, 01:32 PM
  2. Replies: 10
    Last Post: 2009-06-04, 03:53 PM
  3. Replies: 9
    Last Post: 2007-10-23, 12:34 PM
  4. Routine to globally set Line thickness/weight to 0
    By jis.kussowski in forum AutoCAD General
    Replies: 2
    Last Post: 2006-11-23, 11:01 PM
  5. Mirroring globally and uncostraining globally
    By WolffG in forum Revit Architecture - General
    Replies: 4
    Last Post: 2004-07-19, 10:58 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
  •