Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lock HPCOLOR and prevent changes

29 REPLIES 29
SOLVED
Reply
Message 1 of 30
troma
920 Views, 29 Replies

Lock HPCOLOR and prevent changes

Is there any way to prevent the HPCOLOR variable from being changed?

 

Try this:

  1. set your current color to Red
  2. Start the hatch command, and verify that the hatch color is set to "Use Current"
  3. Hatch an area
  4. Change your current color to Yellow
  5. Start the hatch command, and check the hatch color setting: it will not be "Use Current" but instead set to "Red"
  6. Change it to "Use Current" again and create a hatch
  7. Change your current color to Green
  8. Start the hatch command again, and check the color setting: this time it will be set to "Yellow"! Why can't it just keep "Use Current"?

 

Please tell me there is a way to lock this setting.

I always want it to "Use Current".

Changing the current color should not trigger a change to the hatch setting.


Mark Green

Working on Civil 3D in Canada

Tags (2)
29 REPLIES 29
Message 2 of 30
paullimapa
in reply to: troma

What version of AutoCAD are you running? Do a screenshot of About command and share that here


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 30
cadffm
in reply to: troma

Hi,

 

it changes by point 3)

No need to set cecolor to anopther value,

just

HPCOLOR to use the current color

Create a hatch

check HPCOLOR value

 

@paullimapa 

tested in some versions  in 2021.1.3-2025.1

 
 

 

 

Sebastian

EESignature

Message 4 of 30
paullimapa
in reply to: cadffm

Reading OP seems to suggest that even with HPcolor use current every time after a color change the previous color is used and not the new color until after a hatch is completed 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 30
cadffm
in reply to: paullimapa


@paullimapa wrote:

even with HPcolor use current every time after a color change


 

No,

if you set hplayer to "use current" and you created a hatch,

hpcolor changed from "use current" to "red" (if color1 was the current color while hatching)

You can set cecolor to whatever xolor, since hpcolor is set to 1 (for example), it will create hatchs with color red.

 

 

 

Sebastian

EESignature

Message 6 of 30
Kent1Cooper
in reply to: troma

It doesn't do that for me [Acad2024 here].

 

But if a workaround is needed, it seems to me it would involve no more steps to just change the color of the Hatch after making it, rather than changing the current-color setting before making it.  CHPROP, or CHANGE's Properties option, or without any command in the Properties palette.

Kent Cooper, AIA
Message 7 of 30
cadffm
in reply to: Kent1Cooper

EDITED

 

 

 

Hi,

 

in 2024.1.2 it does

HPCOLOR 'use current' and set cecolor to whatever you want, bylayer for example or color3, whatever.

create a hatch

check HPCOLOR

 

If it is still on "use current", it acts really differently on your side.

Sebastian

EESignature

Message 8 of 30
paullimapa
in reply to: cadffm

I'm experiencing what @troma is experiencing on my 2024.1.5 & 2025.1

When I set hpcolor to . or "use current" and my cecolor is yellow and then I run the Hatch command my pattern will be yellow. But once I run cecolor command again and change it this time to red the hpcolor setting still shows the previous color 2 which is yellow. It's not switching to the current cecolor. I would have to run hpcolor command again and enter . or "use current" again and then the next hatch generated will use now the cecolor of red.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 9 of 30
troma
in reply to: paullimapa

Thanks for responses so far.
I'm running Civil 3D 2019.

Mark Green

Working on Civil 3D in Canada

Message 10 of 30
pendean
in reply to: troma


@troma wrote:

...Please tell me there is a way to lock this setting....


Yes: you need to customize and exclusive use LISP for those tasks, and never just a ore command, if you need total control 100% of the time all the time regardless of AutoCAD version or variant quirks.

 

Whether the LISP changes the hatch color before or after creation does not matter, the LISP should ask and then do what you want.

 

There is a dedicated LISP forum if you need help coding it.

 

If you want Autodesk for "fix it", your C3D2019 is out. And they only listen to paying subscribers for wishlists and bug fixes now

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Feedback-to-Autode...

Best wishes.

Message 11 of 30
cadffm
in reply to: paullimapa

Hi Paul 

as I wrote

 

 

"the hpcolor setting still shows the previous color 2 which is yellow. It's not switching to the current cecolor. "

 

Color1 - 255, bylayer or byblock, all values are wrong!

The problem is that Acad doesn't keep the HPCOLOR by the setting you choosed, if it was "." / use current.

it works for all other values, but not for 'use current'.

 

@troma

Write to Adesk and ask for a fix, the bug is sure known and exist since version 2016

 

 

 

 

Sebastian

EESignature

Message 12 of 30
paullimapa
in reply to: cadffm

I'm with OP here. It would be nice to have kept as you say before the 2016 version of how AutoCAD handled the HPCOLOR setting instead of now having to run that setting again every time you change the CECOLOR. Why change two settings when it would have been so easy to just change one. Could you imagine if HPCOLOR was set to BYLAYER and then it won't work when your LAYER is set to another and you'll have to run HPCOLOR again and input BYLAYER again?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 13 of 30
cadffm
in reply to: paullimapa

I'm with OP here"

I am too, it's a bug since 9 versions

 

Sebastian

EESignature

Message 14 of 30
paullimapa
in reply to: cadffm

But I do have to say that I rarely (though I wouldn't say never) change the cecolor from bylayer. I rather rely on the layer color property to determine an object's color than have different objects assigned with their own colors. 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 15 of 30
troma
in reply to: paullimapa

Thanks everyone.
Glad to know I'm not alone.
Just another stupid bug to work around.

Usually I keep everything ByLayer so I hadn't come across it before.

Mark Green

Working on Civil 3D in Canada

Message 16 of 30
Kent1Cooper
in reply to: cadffm


@cadffm wrote:

I'm with OP here"

I am too, it's a bug since 9 versions


... for some.  As I said before, my 2024 does not do this.  So has it been fixed?  Do others with 2024 or 2025 experience this problem?

Kent Cooper, AIA
Message 17 of 30
ВeekeeCZ
in reply to: troma

It's the PROPERTYPREVIEW. Turn it off, restart ACAD, and you're good.

 

Message 18 of 30
cadffm
in reply to: ВeekeeCZ

Nice catch!

Also without a restart, the issue appears with propertypreview ON only.

Sebastian

EESignature

Message 19 of 30
troma
in reply to: Kent1Cooper


@Kent1Cooper wrote:

It doesn't do that for me [Acad2024 here].

 

But if a workaround is needed, it seems to me it would involve no more steps to just change the color of the Hatch after making it, rather than changing the current-color setting before making it.  CHPROP, or CHANGE's Properties option, or without any command in the Properties palette.


You're right, it would be easy to change afterwards (apart from the sometimes challenging step of selecting a hatch object). The problem lies in the unexpected behaviour. So I end up doing everything twice (both before and afterwards) because the machine didn't do what I thought it would do.

 

I would also be interested to know if this has been fixed for 2024. I don't have the opportunity to test it.


Mark Green

Working on Civil 3D in Canada

Message 20 of 30
cadffm
in reply to: troma

"I would also be interested to know if this has been fixed for 2024. I don't have the opportunity to test it."

 

It's not (see pauls and my answer, we tested up to 2025

and at last BeeKeeCZ answer, he found an important fact)

Sebastian

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta