Author Topic: ortho buttons  (Read 3466 times)

0 Members and 1 Guest are viewing this topic.

ryandk

  • Guest
ortho buttons
« on: June 23, 2005, 12:05:19 PM »
How can I assign a keyboard button to ortho on/off.  I know there is f8 and that button by the command line but this guy doesn't want to move his mouse that far, which is fine but he is no speed demon anyway.  I'll leave it at that lest I start on a tangent.

I went to try it the usual way you assign command to the keyboard but ortho is special I guess.

We're using adt 2004.

thanks,
Ryan

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
ortho buttons
« Reply #1 on: June 23, 2005, 12:17:03 PM »
You could add the following to your .mnl file, or load it from the startup suite.

Code: [Select]

(defun c:j (/ o_mode) ; 'J' is the command, change to whatevere you want.

  (setq o_mode (getvar 'orthomode))
  (if (= o_mode 0)
    (command "_ortho" "ON")
    (command "_ortho" "OFF")
  )
  (princ)
)
TheSwamp.org  (serving the CAD community since 2003)

ryandk

  • Guest
ortho buttons
« Reply #2 on: June 23, 2005, 12:43:25 PM »
Thank you very much Mark.

ELOQUINTET

  • Guest
ortho buttons
« Reply #3 on: June 23, 2005, 03:33:41 PM »
i know this doesn't apply to you but fyi. in 2006 if you hold down shift it toggles ortho on

ELOQUINTET

  • Guest
ortho buttons
« Reply #4 on: June 23, 2005, 03:34:40 PM »
and in 2006 j is for the join command  :wink:

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
ortho buttons
« Reply #5 on: June 23, 2005, 03:39:47 PM »
You're right Dan, I was using it for a place holder and quick key to find, as in index finger, home row. :)
TheSwamp.org  (serving the CAD community since 2003)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
ortho buttons
« Reply #6 on: June 23, 2005, 06:17:37 PM »
This fits the toggle scenario, here is another :)

Code: [Select]
(defun c:0() ; press the zero key then space or enter
  (setvar "ORTHOMODE" (- 1 (getvar "ORTHOMODE")))
  (princ)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CADaver

  • Guest
ortho buttons
« Reply #7 on: June 23, 2005, 08:15:25 PM »
ummm... excuse me... sorry to butt in but.... is it just me ...

or does anyone else think it odd that we're writing a routine for a guy because he'd too flippin' lazy to hit the F8 button??  

All the functions supplied require a keystroke, then an enter or space bar.  That's 2 keystrokes, right??  F8 is one, right??  Seems F8 would be just the ticket for a lazy guy.

What am I missing here?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
ortho buttons
« Reply #8 on: June 23, 2005, 09:21:54 PM »
Quote
What am I missing here?


Nothing. I agree.

10 minutes to write and install < with some allowance for future maintenance.
.. to save 1/5 second per operation.
Thats about 3000 operations for it to pay for itself.

.. at least thats how I see it.

but then I'm just old and cranky, so who cares.
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.

daron

  • Guest
ortho buttons
« Reply #9 on: June 24, 2005, 07:58:39 AM »
You may think you're just writing a routine for a person too lazy to hit F8, but don't forget, you're also writing this routine for the sanity of ryandk. To him, the work done could most certainly outweigh the headache he's obviously feeling having to deal with a person that can't lift a finger past the upper alpha row on his keys. Reminds me of a visa commercial.
cost
cost
priceless.

BREZI

  • Guest
ortho buttons
« Reply #10 on: June 24, 2005, 10:40:42 AM »
Quote from: daron
You may think you're just writing a routine for a person too lazy to hit F8, but don't forget, you're also writing this routine for the sanity of ryandk. To him, the work done could most certainly outweigh the headache he's obviously feeling having to deal with a person that can't lift a finger past the upper alpha row on his keys. Reminds me of a visa commercial.
cost
cost
priceless.


Your right!  :D

CADaver

  • Guest
ortho buttons
« Reply #11 on: June 24, 2005, 12:43:41 PM »
Quote from: Kerry Brown
.. to save 1/5 second per operation.
Thats about 3000 operations for it to pay for itself.
UMMM... If it SAVED time, even 1/5 of a second, I'd understand, but the function takes 2 keystrokes to accomplish, where F8 is one.  It actually costs time to use the function.

ryandk

  • Guest
ortho buttons
« Reply #12 on: June 24, 2005, 12:45:49 PM »
First, some of you are correct.  Helping me with this helps me much more than the pain in the ass that was needing it.

However, in his defense, F8 is a long way to go if you're just using the left hand on the keyboard and the right hand on the mouse.  There is also CTRL+L but I think the same applies.  He also used to have it programmed on his mouse but then he got a new mouse that he didn't have an extra button or something.

At any rate, thanks for the help
Oh, and he often cads while wearing ski goggles.

jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
ortho buttons
« Reply #13 on: June 24, 2005, 01:14:03 PM »
Quote from: ryandk
At any rate, thanks for the help
Oh, and he often cads while wearing ski goggles.


Now that IS priceless :lol: . Photo opportunity time
Thanks for explaining the word "many" to me, it means a lot.

CADaver

  • Guest
ortho buttons
« Reply #14 on: June 24, 2005, 01:19:48 PM »
Quote from: daron
... you're also writing this routine for the sanity of ryandk. To him, the work done could most certainly outweigh the headache he's obviously feeling having to deal with a person that can't lift a finger past the upper alpha row on his keys.
I have written more than my share of lame functions to appease some folks, simply because the function was easier to write than it was to fix the folks, but this one is a little much.  I mean it EASIER to use F8, than to use the function.  

Easier still to replace the bozo.

CADaver

  • Guest
ortho buttons
« Reply #15 on: June 24, 2005, 01:26:15 PM »
Quote from: ryandk
However, in his defense, F8 is a long way to go if you're just using the left hand on the keyboard and the right hand on the mouse.
"Long way to go" from where?  Does he not use 9's or 0's because they are a "long way to go'?  I understand how big a PITB some folks can be, but I think this is a little much, at least it would be for me.  Sorry, But I'd have to drop a rock on this guy.

daron

  • Guest
ortho buttons
« Reply #16 on: June 24, 2005, 02:15:50 PM »
I wouldn't do that, CADaver. You might crack his ski goggles. :lol: :lol: :lol: :lol:

I'm glad I'm the only one up here right now. I'd be getting a lot of looks otherwise, from laughing so much.

ronjonp

  • Needs a day job
  • Posts: 7529
ortho buttons
« Reply #17 on: June 24, 2005, 03:43:18 PM »
You could load this:

Code: [Select]
(defun c:OM (/ b)
  (setq b (getvar 'orthomode))
  (if (= b 1)
    (progn
      (setvar 'orthomode 0)
      (princ "\n  < O r t h o  i s  O F F >")
    )
  )
  (if (= b 0)
    (progn
      (setvar 'orthomode 1)
      (princ "\n  < O r t h o  i s  O N >")
    )
  )
  (princ)
)


Then redefine an accelerator key to allow for only one keystroke.
Code: [Select]

["F1"]^C^C'om;


Still kinda reinventing the wheel though.

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

CADaver

  • Guest
ortho buttons
« Reply #18 on: June 24, 2005, 05:42:29 PM »
Yeah, I'd tell him I redefined a button for him, the big silver one on the front of the computer case.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
ortho buttons
« Reply #19 on: June 24, 2005, 06:05:10 PM »
Sometimes I am really, really happy that I work by myself.
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.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
ortho buttons
« Reply #20 on: June 24, 2005, 06:21:27 PM »
Quote from: CADaver
Yeah, I'd tell him I redefined a button for him, the big silver one on the front of the computer case.

Note to self: dont drink soda while reading Cadaver's post.  Dr. Pepper has the tendency to make the keys on the keyboard sticky.  ROFLMAO!  Oh and Daron, I just got all the funny looks you were avoiding.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

ronjonp

  • Needs a day job
  • Posts: 7529
ortho buttons
« Reply #21 on: June 24, 2005, 07:06:57 PM »
Quote
Yeah, I'd tell him I redefined a button for him, the big silver one on the front of the computer case.


Or something like:

["F1"]^C^C_shell SHUTDOWN -s -t 01;
["F2"]^C^C_shell SHUTDOWN -s -t 01;
["F3"]^C^C_shell SHUTDOWN -s -t 01;
["F4"]^C^C_shell SHUTDOWN -s -t 01;
["F5"]^C^C_shell SHUTDOWN -s -t 01;
["F6"]^C^C_shell SHUTDOWN -s -t 01;
["F7"]^C^C_shell SHUTDOWN -s -t 01;
["F8"]^C^C_shell SHUTDOWN -s -t 01;
["F9"]^C^C_shell SHUTDOWN -s -t 01;
["F10"]^C^C_shell SHUTDOWN -s -t 01;
["F11"]^C^C_shell SHUTDOWN -s -t 01;
["F12"]^C^C_shell SHUTDOWN -s -t 01;

  :lol:  :lol:

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC