CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 6028
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SelHatch0

 Post Reply Post Reply
Author
w64bit View Drop Down
Newbie
Newbie


Joined: 16.Sep.2009
Location: United Kingdom
Using: AutoCAD 2024
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote w64bit Quote  Post ReplyReply Direct Link To This Post Topic: SelHatch0
    Posted: 15.Aug.2024 at 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

Back to Top
Vladimir Michl View Drop Down
Moderator Group
Moderator Group

Arkance Systems CZ

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 2039
Post Options Post Options   Thanks (0) Thanks(0)   Quote Vladimir Michl Quote  Post ReplyReply Direct Link To This Post Posted: 15.Aug.2024 at 13:40
You don't need to select the hatches menually. Just <Enter> and all hatches will be selected automatically.
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner
Back to Top
w64bit View Drop Down
Newbie
Newbie


Joined: 16.Sep.2009
Location: United Kingdom
Using: AutoCAD 2024
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote w64bit Quote  Post ReplyReply Direct Link To This Post Posted: 15.Aug.2024 at 13:48
I want to use it in a script to automate deleting these hatches:
SELHATCH0  ERASE
but if there are no hatches the code does not work.
Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2020, 2023
Status: Offline
Points: 661
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kent Cooper Quote  Post ReplyReply Direct Link To This Post Posted: 15.Aug.2024 at 16:22
Originally posted by w64bit w64bit wrote:

I want to use it in a script to automate deleting these hatches:
SELHATCH0  ERASE
but if there are no hatches the code does not work.

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?

SELHATCH0

ERASE


Edited by Kent Cooper - 15.Aug.2024 at 16:24
Back to Top
w64bit View Drop Down
Newbie
Newbie


Joined: 16.Sep.2009
Location: United Kingdom
Using: AutoCAD 2024
Status: Offline
Points: 14
Post Options Post Options   Thanks (1) Thanks(1)   Quote w64bit Quote  Post ReplyReply Direct Link To This Post Posted: 15.Aug.2024 at 16:24
I ended up using
SELHATCH0
(if (ssget "I") (command "ERASE"))

Back to Top
w64bit View Drop Down
Newbie
Newbie


Joined: 16.Sep.2009
Location: United Kingdom
Using: AutoCAD 2024
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote w64bit Quote  Post ReplyReply Direct Link To This Post Posted: 15.Aug.2024 at 20:24
I found a problem.
VLX is selecting also the hatches with non zero area.
I attached a file for testing.

Back to Top
Vladimir Michl View Drop Down
Moderator Group
Moderator Group

Arkance Systems CZ

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 2039
Post Options Post Options   Thanks (0) Thanks(0)   Quote Vladimir Michl Quote  Post ReplyReply Direct Link To This Post Posted: 16.Aug.2024 at 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.
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,547 seconds.