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

0 Members and 1 Guest are viewing this topic.

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Change crosshair color when switched to paperspace
« Reply #15 on: September 08, 2004, 09:33:26 AM »
lol, Just for example:
Here is a small reactor lisp that will react to the "line" command. To cancel the reactor just issue a "SAVE" command.

This is a small demonstration for using Reactors to react to a command.
Code: [Select]
(vl-load-reactors)
(vlr-command-reactor nil '((:vlr-CommandWillStart . StartCommand)))
(defun StartCommand (calling-reactor startcommandinfo / thecommandstart)
  (setq thecommandstart (nth 0 startcommandInfo))
  (cond
    ((= thecommandstart "LINE")
     (theswamp)
     )
    ((= thecommandstart "SAVE")
     (vlr-remove-all :vlr-command-reactor)
     )
    ((= thecommandstart "QSAVE")
     (vlr-remove-all :vlr-command-reactor)
     )
    )
  )
(defun theswamp ()
  (alert "Please wait unitll direct you to TheSwamp...")
  (startapp "explorer" "http://www.theswamp.org/phpBB2/")
  (alert "You may now continue with your line.
         To cancle this reactor use the save command.")
 (princ)
)


When i get some time, ill see if i can help out more.
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 #16 on: September 08, 2004, 09:53:58 AM »
Do you copy this code to a vlisp editor & save as a vlx file & then appload?

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Change crosshair color when switched to paperspace
« Reply #17 on: September 08, 2004, 10:02:07 AM »
Me? No.

Cut and paste it into your command line and issue the line command. (type "l" <sapce bar>) and then you will get an alert box, then an explorer window will open to the swamp. Then issue a save command to cancle it. (ctrl+s).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Anonymous

  • Guest
Change crosshair color when switched to paperspace
« Reply #18 on: September 08, 2004, 10:06:09 AM »
that's pretty cool

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Change crosshair color when switched to paperspace
« Reply #19 on: September 08, 2004, 10:13:47 AM »
Of course it is?! ...J/K, Glad you like it.
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 #20 on: September 08, 2004, 10:32:54 AM »
sorry, that was me...forgot to login (wasn't being sarcastic)

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Change crosshair color when switched to paperspace
« Reply #21 on: September 08, 2004, 10:44:00 AM »
Oh, i know. The thought of you being sarcastic didnt even cross my mind.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SMadsen

  • Guest
Change crosshair color when switched to paperspace
« Reply #22 on: September 08, 2004, 11:00:37 AM »
Quote from: Se7en
Me? No.


No, copy and paste to VIM, then save it in VIM with the extension .007, then setup VIM to colorcode lsp files, then write a WSH script to load .007 files in AutoCAD, then open VIM and ...

ok ok, that was sarcasm  :P

Good job Se7en. I think I'll put that alert into all my VI.. ummm lsp files

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Change crosshair color when switched to paperspace
« Reply #23 on: September 08, 2004, 11:41:44 AM »
Quote from: SMadsen
No, copy and paste to VIM, then save it in VIM with the extension .007, then setup VIM to colorcode lsp files, then write a WSH script to load .007 files in AutoCAD, then open VIM and ...

ok ok, that was sarcasm  :P

Good job Se7en. I think I'll put that alert into all my VI.. ummm lsp files
*blink* ... Ahhh!? *sigh*  

Pay no attention to him everybody, that is how he would do it. (*Se7en whispers* Cause he’s not that good with AutoLisp, so he has to do things five times.)

Stig, i thought you would like VIM because the guy that wrote it is Dutch. (Support those fellow Europeans.) --Ok, those were some bad jokes. ...darn it, I’m loosing the ability to make smartass remarks.

BTW, I like that extension of .007 ...*wink* lmao!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SMadsen

  • Guest
Change crosshair color when switched to paperspace
« Reply #24 on: September 08, 2004, 11:52:35 AM »
Hehe

Those dutchies are usually pretty good with computers but you know there has to be an exception to every rule .. I think VIM is it  :twisted:

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Change crosshair color when switched to paperspace
« Reply #25 on: September 08, 2004, 11:58:53 AM »
*choke* ...Ahhhh! Darnit!! Stig has got me on the fricken run here. I cant think of anything witty to say.
*Se7en starts shaking*
Stig your a big dummy!
...grrr!

Awe crap?!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Change crosshair color when switched to paperspace
« Reply #26 on: September 08, 2004, 12:01:08 PM »
...I think its MircoCrappy that is rotting my brain!?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Change crosshair color when switched to paperspace
« Reply #27 on: September 08, 2004, 05:09:31 PM »
Sorry, I had a meeting at lunch and i had another "thing" i needed to get done. But i whiped up some code for ya; Give this a try and let me know if it works alright for ya.

Code: [Select]
(vl-load-reactors)
(vlr-miscellaneous-reactor
   nil '((:vlr-layoutSwitched . ChangeLayoutCrosshairColor-Red)))
(defun ChangeLayoutCrosshairColor-Red (calling-reactor info /)
   (if (not (eq (car info) "Model"))
     (vla-put-LayoutCrosshairColor
       (vla-get-Display (vla-get-Preferences (vlax-get-acad-object)))
       (vlax-make-variant 255 vlax-vbLong))))
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 #28 on: September 08, 2004, 07:46:51 PM »
I think ur on the right path... that changed the crosshairs to red when switching to pspace. How do you get it to change to white when you click in a viewport?

JohnK

  • Administrator
  • Seagull
  • Posts: 10605
Change crosshair color when switched to paperspace
« Reply #29 on: September 08, 2004, 08:17:06 PM »
Holly cow man?! Your killing me! ...I dont have the first idea. Ill have to think that one over a bit.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org