Results 1 to 4 of 4

Thread: Hatch to back

  1. #1
    I could stop if I wanted to
    Join Date
    2001-01
    Posts
    257
    Login to Give a bone
    0

    Default Hatch to back

    Hi
    I have a lisp routine that I want to modify so that it only runs only if it finds objects in the current environment - modelspace or paperspace.
    Code:
    (defun c:HAT2BACK(/ sset)
       (if (setq sset (ssget "_x" (list (cons 0 "HATCH"))))
         (progn
           (command ".draworder" sset "" "back")
           (prompt "\nAll hatches successfully sent to the back.")
         )
       )
    (princ)
    )
    Thanks
    Manuel

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

    Default Re: Hatch to back

    Does the HATCHTOBACK command not accomplish what you are attempting?

    Otherwise, you would need to add to your filter for the selection set to include the current space. This would be a group code of 410, which includes the current value of the CTAB variable.
    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

  3. #3
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Hatch to back

    As I recall the earliest version of HATCHTOBACK command only worked for the current session though it's worked permanently for me for many years.
    Try this:
    Code:
    (defun c:HAT2BACK(/ cspace sset)
       (if (= 1(getvar 'cvport)
         (setq cspace (67 . 1)(67 . 0))
       )
       (if (setq sset (ssget "_x" (list cspace (cons 0 "HATCH"))))
         (progn
           (command ".draworder" sset "" "back")
           (prompt "\nAll hatches successfully sent to the back.")
         )
       )
    (princ)
    )

  4. #4
    I could stop if I wanted to
    Join Date
    2001-01
    Posts
    257
    Login to Give a bone
    0

    Default Re: Hatch to back

    Tom
    Thank you very much for the help. Much appreciated.
    Manuel

Similar Threads

  1. back to back functions
    By mbrandt5 in forum AutoLISP
    Replies: 1
    Last Post: 2015-05-21, 12:34 PM
  2. Pipe Profile Component Hatch to back
    By Wish List System in forum Civil 3D Wish List
    Replies: 3
    Last Post: 2015-02-19, 05:26 PM
  3. 2013: Back To Back Mullions on Storefront - how do i do it?
    By bwilliams133 in forum Revit Architecture - General
    Replies: 7
    Last Post: 2013-06-21, 06:43 PM
  4. back to back toilets
    By moliva in forum Revit MEP - General
    Replies: 8
    Last Post: 2009-11-25, 04:48 PM
  5. Back to Back WT
    By justin.biddle in forum Revit Architecture - Families
    Replies: 0
    Last Post: 2009-09-11, 04:12 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
  •