Mr.Alex Posted October 7, 2009 Share Posted October 7, 2009 Hi, Quite often I recieve drawings with loads of hatches/solid fills in. For example a housing layout with all of the houses, trees, roads, grass etc hatched. I generally want to delete these/turn them off and work with a line drawing. Sometimes the hatches have been drawn on their own layer, so turning them off is simple. But sometimes they've been drawn on layers with other things I want to keep. Genereally there are loads of hatches, so deleting them one by one is frustratingly slow. I used to use Microstation, and in that there was a tool to delete hatches or fills, and if you selected all items you could delete the lot in one go. Is there such a tool in AutoCAD? If not, what would you advise? Many thanks, Alex Quote Link to comment Share on other sites More sharing options...
skipsophrenic Posted October 7, 2009 Share Posted October 7, 2009 If you want to select and then delete all the hatches try using the QSELECT command Quote Link to comment Share on other sites More sharing options...
Shibuboss Posted October 7, 2009 Share Posted October 7, 2009 Also Try " FILTER " Command. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 7, 2009 Share Posted October 7, 2009 FYI - Run QSELECT first as skipso has suggested. Under Apply to select Entire drawing. Under Object Type select Hatch. Set Properties, Value and Operator to further define your selection set if need be. Click on the OK button. Every hatch pattern has now been selected. Execute the ERASE command and they should all be eliminated from the drawing. Quote Link to comment Share on other sites More sharing options...
Tiger Posted October 7, 2009 Share Posted October 7, 2009 FILTER has the same basic function as QSELECT, but is more powerful and has more options, like AND and OR functions if I remeber correctly. It's worth checking out if you have never used it. Quote Link to comment Share on other sites More sharing options...
Mr.Alex Posted October 7, 2009 Author Share Posted October 7, 2009 Great, thanks Quote Link to comment Share on other sites More sharing options...
Tommy78 Posted October 7, 2009 Share Posted October 7, 2009 Just a couple of hours ago i thought: it would be sooo useful if you could QS using multiple parameters! And there comes shibuboss with the FILTER command which i have never heard of in my 9 months as a cad-designer! So cool, thanks shibu! Quote Link to comment Share on other sites More sharing options...
skipsophrenic Posted October 7, 2009 Share Posted October 7, 2009 Just a couple of hours ago i thought: it would be sooo useful if you could QS using multiple parameters!And there comes Tiger with the FILTER command which i have never heard of in my 9 months as a cad-designer! Dont worry mate - i been using AutoCAD for 2 and a bit years now, an i didnt know about that! Quote Link to comment Share on other sites More sharing options...
leos98 Posted April 19, 2011 Share Posted April 19, 2011 Thank guys for this, I was facing selecting a lot of wall fill hatches that I needed to move to a 253 color. Quick search in CADTutor.. and 2 minutes later the whole task is done!!!! Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 19, 2011 Share Posted April 19, 2011 You could also use the very old, but quite useful SSX tool. eg. Command: SSX Initializing... Type "ssx" at a Command: prompt or (ssx) at any object selection prompt. Select object <None>: Enter filter option [block name/Color/Entity/Flag/LAyer/LType/Pick/Style/Thickness/Vector]: E >>Enter entity type to add <RETURN to remove>: HATCH Current filter: ((0 . "HATCH")) Enter filter option [block name/Color/Entity/Flag/LAyer/LType/Pick/Style/Thickness/Vector]: Quote Link to comment Share on other sites More sharing options...
nicolas Posted April 23, 2011 Share Posted April 23, 2011 Through I have seen the Filter Dialog Box, I have never never heard of SSX. What does it do? and How do we use the SSX|Filter Command? Quote Link to comment Share on other sites More sharing options...
eldon Posted April 23, 2011 Share Posted April 23, 2011 Through I have seen the Filter Dialog Box, I have never never heard of SSX. What does it do? and How do we use the SSX|Filter Command? Try looking in the Express Tools help files. All the information is there Quote Link to comment Share on other sites More sharing options...
nicolas Posted April 25, 2011 Share Posted April 25, 2011 Hi, The SSX Command is indeed part of the Express tool through I have not seen it in the Express Menu. I believe one of its advantage is that it can be used in Autolisp compare to Quick Select. I will look into it and Filter and how they can be used to boost drawing speed. Many thanks. Quote Link to comment Share on other sites More sharing options...
eldon Posted April 25, 2011 Share Posted April 25, 2011 The SSX command is only available from the Command Line, and does not appear in the Express Tools Menu. That is why I suggested looking at the Express Tools Help files, where you can find out all about it. Quote Link to comment Share on other sites More sharing options...
Arizona Posted April 25, 2011 Share Posted April 25, 2011 Click on one of your hatchs (select it), then right click and find "Select Similar". I use that one a lot, as well as qselect and filter. They all have their uses. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted April 25, 2011 Share Posted April 25, 2011 I usually use one of the methods listed already (Select Similar / QSelect + Delete), but as this thread two pages long, why not add one more alternative!? ... Just for fun: (defun c:BBH () (C:BYEBYEHATCH)) (defun c:BYEBYEHATCH (/ ss layerTable layerItem lockedLayers) (princ "BYE BYE HATCH") (vl-load-com) (if (setq ss (ssget "_x" '((0 . "HATCH")))) (progn (vla-startundomark (cond (*activeDoc*) ((setq *activeDoc* (vla-get-activedocument (vlax-get-acad-object)))))) (setq layerTable (vla-get-layers *activeDoc*)) (vlax-for x (setq ss (vla-get-activeselectionset *activeDoc*)) (if (and (setq layerItem (vla-item layerTable (vla-get-layer x))) (= :vlax-true (vla-get-lock layerItem)) (setq lockedLayers (cons layerItem lockedLayers))) (progn (vla-put-lock layerItem :vlax-false) (vla-delete x)) (vla-delete x))) (foreach l lockedLayers (vla-put-lock l :vlax-true)) (vla-delete ss) (vla-endundomark *activeDoc*)) (prompt "\n** No hatch objects exist ** ")) (princ)) ** Code above accounts for locked layers, but will not modify blocks (i.e., nested hatch) ** Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 25, 2011 Share Posted April 25, 2011 Mat, if you are going to check the object layer's locked/unlocked state while stepping through the selection, why not just reset it after deleting the hatch object, instead of creating a list of layer objects and stepping through the list at the end? IMO, objects on locked layers are there for a reason. Not that I haven't ever done it, but I'm just not a big fan of unlocking layers to mod stuff in a select all scenario - notice the statement is prefixed with 'IMO', so take it for what little it's actually worth. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted April 25, 2011 Share Posted April 25, 2011 Mat, if you are going to check the object layer's locked/unlocked state while stepping through the selection, why not just reset it after deleting the hatch object, instead of creating a list of layer objects and stepping through the list at the end?IMO, objects on locked layers are there for a reason. Not that I haven't ever done it, but I'm just not a big fan of unlocking layers to mod stuff in a select all scenario - notice the statement is prefixed with 'IMO', so take it for what little it's actually worth. No worries, Alan. The reason I chose not to restore the lock (after each deletion) is because the code steps through the selection set... Hypothetically, if there were say two or more hatches on the same layer, and they're only being deleted one at a time (as the vlax-for steps through the ActiveSelectionSet) then the unlock / lock would be done for each item on the respective layer. Not sure how you, or others may work, but I usually have all 'like' hatches on a single layer (i.e., Sidewalk, Milling & Resurfacing, Sod, Wetlands, etc.). Point taken for leaving locked layers alone... :: Disclaimer :: anyone who uses the above posted example ( Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 25, 2011 Share Posted April 25, 2011 Yeah, I see now that you check if the object's layer is locked, which would not be locked on the second go around for a layer that already had a object 'processed'. It just seemed a little flimsy, but in truth, either way would be. Mostly, I just don't like the idea of unlocking layers and altering object(s) on said locked layers - the layers are obviously locked for a reason. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted April 25, 2011 Share Posted April 25, 2011 Yeah, I see now that you check if the object's layer is locked, which would not be locked on the second go around for a layer that already had a object 'processed'. It just seemed a little flimsy, but in truth, either way would be.Mostly, I just don't like the idea of unlocking layers and altering object(s) on said locked layers - the layers are obviously locked for a reason. We're in agreement for Best Practices... I simply included this functionality in response to the OP's explicit request of how to 'Delete all hatches in a drawing?' I do use routines which *add* entities to a given drawing regardless of locked layers; but I cannot think of a practical, non-one-time-use as I *believe* this thread's purpose to be. 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.