I need macros for the Associative hatch

I need macros for the Associative hatch

Anonymous
Not applicable
1,730 Views
17 Replies
Message 1 of 18

I need macros for the Associative hatch

Anonymous
Not applicable

I need macros for the Associative hatch. I use such kind of macros:
^C^C_hatch ansi31 200 0
^C^C_hatch;ansi31;200;0
It works but produces NONassociative hatches. What is wrong ?

0 Likes
Accepted solutions (1)
1,731 Views
17 Replies
Replies (17)
Message 2 of 18

steven-g
Mentor
Mentor

Run the _hatch command and read the prompts.

The first prompt is expecting a pick point or it will accept a keyword (not a hatch name) to use a hatch name you first need to tell the macro to use the 'properties' option and from that prompt you can enter a pattern name.

If annotative isn't already the default then that is also an option given to use annotative from the command line version.

The most important thing to watch when creating macros is run the commands first from your keyboard and see what prompts are available, then use that sequence to write your macro.

Message 3 of 18

Anonymous
Not applicable

Unfortunatelly you are not correct. Try youself before the answer! AutoCad goes different logic in command line and Macros. In case of Macros it asks hatch type first!  

0 Likes
Message 4 of 18

pendean
Community Legend
Community Legend
HPASSOC variable needs to be on, look up usage in HELP.

While you are in HELP, look up all the other hatch variables (almost all start with HP), you'll be amazed at how much control you can get for macros.

HTH
Message 5 of 18

Anonymous
Not applicable

HPASSOC is ON. Nothing new unfortunatelly.

Any text I type beside the hatch command breaks the accociation to boundary. Probably this is the software bug nobody noticed yet. 

0 Likes
Message 6 of 18

Anonymous
Not applicable

If who has time it's even faster to try yourself than type wrong answers.

Offered macro ---  ^C^C_hatch ansi31 200 0 --- works fast and well! But the hatch is not associative!

0 Likes
Message 7 of 18

steven-g
Mentor
Mentor

No bug here, could be one on your machine, did you follow the prompts setting the scale and rotation etc. after setting the pattern name. And giving hpassoc the correct value as @pendean suggested.

Message 8 of 18

steven-g
Mentor
Mentor

Oops just spotted your using '_hatch' try this version '-hatch' in your macro it gives you much more control for the command line version

Message 9 of 18

pendean
Community Legend
Community Legend
Works absolutely fine here with your macro in LT2019 and LT2021 Boss, you've got something else going on. You can always include the HPASSOC setting in your macro to always confirm it is on to see if that helps.

>>>...Any text I type beside the hatch command breaks the accociation to boundary...<<<
Unless you think associative hatching is supposed to do something else perhaps? I have no idea what that statement even means, I can type TEXT and MTEXT all day long and hatch association is never affected.
Message 10 of 18

pendean
Community Legend
Community Legend
>>>...Oops just spotted your using '_hatch'...<<<
Makes no difference here.
Message 11 of 18

steven-g
Mentor
Mentor

Really, there are two very distinct sets of prompts between those two versions, at least on my machine

_hatch

_hatch.jpg

-hatch

-hatch.jpg

Message 12 of 18

pendean
Community Legend
Community Legend
That may be the solution for the OP. I used the OP's second macro (first post) in both LT2019 and LT2021 here as is, no changes, no issues.
Message 13 of 18

steven-g
Mentor
Mentor

Curiouser and curiouser, I just ran the OP's macro and it indeed fails to create an associative hatch no matter what the hpassoc setting (2019, 2020 and 2021) so if it works for you there must be some other variable difference. But yes the more extensive -hatch version will let you set associativity.

Message 14 of 18

pendean
Community Legend
Community Legend

LT2019.1.2 here in Win10Pro, nothing special otherwise.
LT2021 has no updates installed, same laptop.

 

Capture.JPG

Message 15 of 18

steven-g
Mentor
Mentor

Same macro

assoc.jpg

Message 16 of 18

Anonymous
Not applicable

So looks like the bug detected.

I have 2019LT at work and 2011 at home. Problem is noticed quite long time ago on both machines. I have sent tens requests to the Autodesk office, they only suggested to read the forum...

Sorry for the bad English lang, I normally speak other one 🙂 

At the moment sitting home with the 2011, the versus "-hatch" makes app frozen for 2-3 minutes but I try. It seems that using -hatch I can't choose the hatch type cause it uses the last one.

Thank you very much for the help! 

0 Likes
Message 17 of 18

steven-g
Mentor
Mentor
Accepted solution

If it is working for @pendean then it is unlikely to be a bug, maybe some other obscure variable or setting, as for the  "-hatch" version try this

^C^C^C-hatch;p;ansi31;200;0;a;a;y;;s;\;;

you don't need to finish the macro by pressing enter at the keyboard the macro takes care of that for you (just select an object) 

Message 18 of 18

Anonymous
Not applicable

GREAT! It works! Thank you! And no freezes,Asshatch solved.PNG very fast 

0 Likes