Jump to content

Lisp for selecting hatches based on scale


toberino

Recommended Posts

So I should be able to erase the red above since it seems to be included in the ssget for the hatch.?

Correct , I modified my earlier post due to a mistake of the variable name . please modify your codes accordingly

Link to comment
Share on other sites

  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

  • toberino

    12

  • Tharwat

    8

  • ttray33y

    5

  • danglar

    1

Okay, got it corrected with the new code. Why does it select and delete the hatches upon closure of the appload dialog box instead of just loading the routine.

Link to comment
Share on other sites

Okay, got it corrected with the new code. Why does it select and delete the hatches upon closure of the appload dialog box instead of just loading the routine.

 

Because you have an extra bracket before the if function that ends the routine and leaves the rest of the codes to work outside the program ;)

Link to comment
Share on other sites

Because you have an extra bracket before the if function that ends the routine and leaves the rest of the codes to work outside the program ;)

 

(Defun C:ArchWipe (/ sset)
(command "-LAYER" "U" "*" "")
(Command "-Layer" "On" "*" "")
(Command "-Layer" "Thaw" "*" "On" "*" "")
(command "-layer" "U" "*" "T" "*" "set" "0" "")

 (vlax-for Layout (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object)))
   (if	(/= (vla-get-Name Layout) "Model")
     (vla-Delete Layout)
   )
 )
[color="red"])[/color]
(if (setq sset (ssget "_X" '((0 . "HATCH"))))
 (command "_.erase" sset "")
 )
(command "-xref" "D" "*" "")
(command "-purge" "all" "*" "n")
)

 

Sweet!!!! I removed that bracket up there like you said and everything seems to work the way I would expect it to. Excellent work! I offer you one hundred imaginary beers! Cheers!

Same to you ttray33y! You were the first to jump on it. I appreciate the help.

Link to comment
Share on other sites

Sweet!!!! I removed that bracket up there like you said and everything seems to work the way I would expect it to. Excellent work! I offer you one hundred imaginary beers! Cheers!

 

:lol: you are welcome , all credit goes to ttray33y .

 

Cheers :beer:

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...