Display full version of the post: SelHatch0

w64bit
15.08.2024, 13:37
Hello,Is it possible, please, to make a change in SelHatch0 in order to eliminate manual selection from the code?Entering SelHatch0 command + Enter to select the hatches and closing the command.Thank you

Vladimir Michl
15.08.2024, 13:40
You don't need to select the hatches menually. Just <Enter> and all hatches will be selected automatically.

w64bit
15.08.2024, 13:48
I want to use it in a script to automate deleting these hatches:SELHATCH0  ERASEbut if there are no hatches the code does not work.

Kent Cooper
15.08.2024, 16:22
[QUOTE=w64bit]I want to use it in a script to automate deleting these hatches:SELHATCH0  ERASEbut if there are no hatches the code does not work.[/QUOTE]
What would you expect it to do if there are no Hatches?  If it's part of something larger, and no Hatches interferes with its continuing, does it work if you use an actual Enter instead of a space in the Script, for the select-all option?SELHATCH0ERASE

Kent Cooper2024-08-15 16:24:33

w64bit
15.08.2024, 16:24
I ended up usingSELHATCH0 (if (ssget "I") (command "ERASE"))

w64bit
15.08.2024, 20:24
I found a problem.VLX is selecting also the hatches with non zero area.I attached a file for testing.uploads/68738/Hatch.zip

Vladimir Michl
16.08.2024, 14:34
No, this example is a typical object with a zero/undefined area (at least in AutoCAD 2025.1). Try the Properties palette or the AREA Object command.

kriperflag
05.01.2025, 00:45
I completely understand your point—it would be much more efficient if SelHatch0 could automate the selection process without requiring manual input. Streamlining this step would save time and make the command more user-friendly, especially for repetitive tasks. 

Vladimir Michl
05.01.2025, 10:05
We have added the command DelHatch0 to the new version of this utility (V1.2, see Download). The prompts are the same, but any complaining hatches will be deleted automatically.