Author Topic: Change crosshair color when switched to paperspace  (Read 13980 times)

0 Members and 1 Guest are viewing this topic.

bman

  • Guest
Change crosshair color when switched to paperspace
« on: September 07, 2004, 08:16:24 PM »
How would i go about creating a reactor that would change the crosshairs to red everytime you're in paperspace & switch it back to white when in modelspace or tilemode 1?...or switch the background color from black to grey?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Change crosshair color when switched to paperspace
« Reply #1 on: September 07, 2004, 08:37:23 PM »
You can use the AcadPreferencesDisplay Object Properties.

explicitly
(vla-put-GraphicsWinLayoutBackgrndColor ...
(vla-put-LayoutCrosshairColor ...

  etc, etc,

A thought though.Are you aware these can be set from
 Options-> Display->Colors....

set and forget, and save the reactor processing ?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

bman

  • Guest
Change crosshair color when switched to paperspace
« Reply #2 on: September 07, 2004, 09:05:17 PM »
yeah i'm aware of the
Options-> Display->Colors....
The only problem is that the colors don't change when you're in pspace vs. mspace. I have two people that recently switched to using paperspace & they're continously drawing half of the entities in pspace & the other half in model. I figured if i could get the crosshairs to change to red when in paperspace that would throw up a red flag for them to switch to mspace. What's the best way to achieve this....using reactors???

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Change crosshair color when switched to paperspace
« Reply #3 on: September 07, 2004, 10:27:36 PM »
Quote from: bman
yeah i'm aware of the
Options-> Display->Colors....
The only problem is that the colors don't change when you're in pspace vs. mspace. I have two people that recently switched to using paperspace & they're continously drawing half of the entities in pspace & the other half in model. I figured if i could get the crosshairs to change to red when in paperspace that would throw up a red flag for them to switch to mspace. What's the best way to achieve this....using reactors???


funny, mine does.

and if they switch from paperspace to modelspace when in a layout, the X-Y Icon displays in the work area.

I would have another look before you start to think about adding reactors/event handling.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
Change crosshair color when switched to paperspace
« Reply #4 on: September 07, 2004, 10:38:57 PM »
Quote from: bman
I figured if i could get the crosshairs to change to red when in paperspace that would throw up a red flag for them to switch to mspace.


Wouldn't the bright white screen throw up a "red flag?"

hendie

  • Guest
Change crosshair color when switched to paperspace
« Reply #5 on: September 08, 2004, 03:20:31 AM »
Quote from: Dommy2Hotty
Wouldn't the bright white screen throw up a "red flag?"


that's just what I was thinking  :shock:

daron

  • Guest
Change crosshair color when switched to paperspace
« Reply #6 on: September 08, 2004, 08:20:28 AM »
It would if you left it as a bright white screen. Then again even if you do, it doesn't let the user know whether or not he's in a viewport or not. I do the same thing, where in the model tab, my crosshairs are green and when in any of the layout tabs, my crosshairs are red. If I should activate any of the viewports, the color of the crosshair is still red. What bman is looking for is the crosshairs to be changed to the model tab color while in a viewport through a layout tab. I kind of like the idea he's coming up with. As far as further development goes, it would be good if the crosshairs were changed to a color based on if the current viewport were locked or unlocked.

bman

  • Guest
Change crosshair color when switched to paperspace
« Reply #7 on: September 08, 2004, 08:52:39 AM »
I've changed the crosshairs under
Options>Display>Color>Layout Tabs Pointer to red.
When in tilemode 0, I switch back & forth between between pspace & mspace the crosshairs stay red. When in tilemode 0, I was thinking that if the crosshairs changed colors when switching from vport modelspace to pspace then hopefully that would turn on a light bulb.

The problem is that others here turn on all the layers & switch to tilemode 0 & freeze layers in the current vport & edit the plan sheets in each individual vport. I keep getting interupted quite often on a daily basis due to "Lost in Paperspace". I use scripts & layer manager to manipulate plans & switch to pspace to just plot the dwg so i don't have this problem.

I know some sort of standards would fix this problem but no one here is willing to enforce them. We have ten different people doing things ten different ways.

daron

  • Guest
Change crosshair color when switched to paperspace
« Reply #8 on: September 08, 2004, 08:56:39 AM »
bman, I feel your pain. We're going through similar problems here. Yours is far worse though. As far as your last post, I believe I do understand the line of thought you're after. I'll try to look into it using what Kerry offered up.

bman

  • Guest
Daron hit the nail on the head
« Reply #9 on: September 08, 2004, 09:03:14 AM »
It would help those who do their editing within the viewports if the crosshairs changed colors when switching from mspace to pspace so that things don't get unintentionally placed in pspace.

daron

  • Guest
Change crosshair color when switched to paperspace
« Reply #10 on: September 08, 2004, 09:06:45 AM »
I do understand as I have the same issues occasionally.

bman

  • Guest
Change crosshair color when switched to paperspace
« Reply #11 on: September 08, 2004, 09:07:24 AM »
Thanks Daron.
Any help is greatly appreciated!

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
Change crosshair color when switched to paperspace
« Reply #12 on: September 08, 2004, 09:11:27 AM »
Kerry gave it to ya already. Didnt he? He told you some of the key functions to use. (Thats prety much it, after that is just misc "setup" code.)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

bman

  • Guest
Change crosshair color when switched to paperspace
« Reply #13 on: September 08, 2004, 09:22:26 AM »
Looks Greek to me as i am not familiar with creating reactors.

daron

  • Guest
Change crosshair color when switched to paperspace
« Reply #14 on: September 08, 2004, 09:23:48 AM »
Well, here's the start, but as you'll notice I had to change the value of the variant for the color code. For some reason it outputs as a 19 variant value, which doesn't seem to exist. Now, the value in the variant is, on my cpu, 65280?!? Anybody know how to make color sense of that?
Code: [Select]
(setq $acad (vlax-get-acad-object)
      $doc  (vla-get-activedocument $acad)
      )
(setq acpref (vla-get-preferences $acad)
      acdisp (vla-get-display acpref)
      aclcco (vlax-variant-change-type (vla-get-LayoutCrosshairColor acdisp) 5)
      )