Tharwat Posted February 4, 2015 Share Posted February 4, 2015 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 Quote Link to comment Share on other sites More sharing options...
toberino Posted February 4, 2015 Author Share Posted February 4, 2015 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. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted February 4, 2015 Share Posted February 4, 2015 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 Quote Link to comment Share on other sites More sharing options...
toberino Posted February 4, 2015 Author Share Posted February 4, 2015 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. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted February 4, 2015 Share Posted February 4, 2015 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! you are welcome , all credit goes to ttray33y . Cheers Quote Link to comment Share on other sites More sharing options...
danglar Posted January 19, 2017 Share Posted January 19, 2017 .. a ttray33y approach was slightly modified by me (added option to operate with Scale of user selected hatch) Select Hatch by Scale - HS.lsp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.