Jump to content

Creating shortcuts to toggle on/off specific running osnaps


Recommended Posts

eyeofnewt555

Hey guys,

 

So, I've played around with CUI and haven't found a way to do this, so I thought I'd throw it out to your brilliant minds.

 

I know that F3 toggles all ticked osnaps on/off, but I'd like to create shortcuts to toggle specific osnaps on/off (running osnaps, not temporary). Right now, I have to go down to the bottom toolbar and turn on/off any given osnap.

 

It looks like through CUI you can set a shortcut to turn on a given osnap--but it turns off anything else that's already on. I'd like the existing osnap status (which ones are running) to stay as-is, with only the desired osnap changing to on/off.

 

I hope this makes sense.

 

Thanks,

Liz

Link to post
Share on other sites
tzframpton

Instead, why not use the exact snap you need with a Command Modifier instead, only when you need it? It's easy to do, requires no programming and is just as effective. While you're in the middle of a command, Shift+right-click and select the snap you need right then and there.

 

Easy peasy. :)

 

-TZ

Link to post
Share on other sites
eyeofnewt555
Instead, why not use the exact snap you need with a Command Modifier instead, only when you need it? It's easy to do, requires no programming and is just as effective. While you're in the middle of a command, Shift+right-click and select the snap you need right then and there.

 

Easy peasy. :)

 

-TZ

 

Appreciate the answer, but that's just not my work flow. I like having several snaps running at a time, but the exact set I need changes throughout the day.

Link to post
Share on other sites

If you make a defun (defun c:47 () (setvar "osmode" 47)) you can call it in the middle of a command by '47 this is a transparent call similar to the post above by Tz.

Link to post
Share on other sites
tzframpton
Appreciate the answer, but that's just not my work flow. I like having several snaps running at a time, but the exact set I need changes throughout the day.
I used to have the exact same mindset back in the day regarding my workflow. I felt that I "needed" particular OSNAPS on at all times. Turns out, it's an OCD thing, not a necessity.

 

Big Al has at least one solution for you. Hopefully that is what you're looking for. Command Modifiers are still just as quick and effective though. If you're really in need of only a certain selection of OSNAPS "throughout the day" like you mention, then memorizing a few different OSMODE values would probably be just as efficient. My method was intended for the constant switching at random times, but if it's a workflow thing that doesn't require constant switching then I'd go for memorizing OSMODE values and you're good to go.

 

-TZ

Link to post
Share on other sites
Appreciate the answer, but that's just not my work flow. I like having several snaps running at a time, but the exact set I need changes throughout the day.

 

I agree with BIGAL & TZ, you should use the OSMODE command.

You may need to remember 3 or 4 different numbers, each of which represents a particular combination of osnaps.

Set the ones you want to have available, then enter OSM and hit ENTER, at your commandline and a number will be reported at your commandline, which represents that particular combination of osnaps.

Write it down, until you remember it, then adjust to another set which you frequently use, and want to have easily available, and repeat the previous process.

How many different combinations do you want to have available?

It sounds like you might want to create a few new buttons, each having a custom macro, to change the current OSMODE setting to the setting defined in the macro. You could add those to a toolbar, ribbon panel, or?

Edited by Dadgad
Link to post
Share on other sites

I also used to use OSMODE to achieve this.

 

I would have a set of menu buttons (old days) each one of which set a different Osmode value depending on what osnaps I wanted in use at a particular time.

(you just add the osmode 'numbers' of each one you want together to give the Osmode value to enter, look up Osmode in the help for the individual 'numbers').

 

I also had similar buttons that would switch isometric planes, and the text and dimensioning angles to suit that plane, with just one click.

 

EDIT

If anyone is interested I found that old isometric toolbar code, it was for the old .mns style menus.

Of course it will need updating to suit modern menus, you won't have the button icons, but it should give you the idea:

I could probably find those icons if anyone asks for them.

**TB_DIMENSION_ISO
ID_Toolbar3_0  [_Toolbar("Dimension ISO", _Top, _Show, 1, 0, 1)]
ID_UserButton_16 [_Button("Per Osnap", "ICON3881.bmp", "ICON3881.bmp")]$M=$(if,$(eq,$(getvar,osmode),631),_osmode 759,_osmode 631) 
              [--]
ID_UserButton_15 [_Button("Iso / Normal Snap", "ICON.bmp", "ICON.bmp")]$M=$(if,$(eq,$(getvar,snapstyl),1),_snapstyl 0,_snapstyl 1) 
ID_UserButton_14 [_Button("ISO set up", "ICON8145.bmp", "ICON8145.bmp")]^C^C-style;OBLIQUE1;ROMANS;0;;-30;;;;-style;OBLIQUE2;ROMANS;0;;30;;;;-style;ROMANS;ROMANS;0;;0;;;;DIMTXSTY;OBLIQUE1;-dimstyle;S;OBLIQUE1;DIMTXSTY;OBLIQUE2;-dimstyle;S;OBLIQUE2;GRAPHSCR;
ID_UserButton_2 [_Button("dim-iso1", "ICON0685.bmp", "ICON0685.bmp")]^C^C_menuecho;2;-dimstyle;r;oblique1;dimaligned;\\\dimedit;o;@;;150;menuecho;0;
              [--]
ID_New_1       [_Button("dim-iso2", "ICON5189.bmp", "ICON5189.bmp")]^C^C_menuecho;2;-dimstyle;r;oblique2;dimaligned;\\\dimedit;o;@;;30;menuecho;0;
              [--]
ID_UserButton_16 [_Button("dim-iso3", "ICON7998.bmp", "ICON7998.bmp")]^C^C_menuecho;2;-dimstyle;r;oblique1;dimaligned;\\\dimedit;o;@;;90;menuecho;0;

Edited by nukecad
Link to post
Share on other sites

I think you can achieve what you are after with "accelerator keys". Sorry I do not know exactly how it is done, you have to search for it.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...