Custom Toggle Switch on Ribbon?

Custom Toggle Switch on Ribbon?

Anonymous
Not applicable
783 Views
3 Replies
Message 1 of 4

Custom Toggle Switch on Ribbon?

Anonymous
Not applicable

I am wondering if there is a way to have a command button on the ribbon that will toggle on and off certain layers.  Additionally, I would like the ICON of the button to swap from one image to another depending on which state the toggle is in.  Is anything like this possible?

0 Likes
784 Views
3 Replies
Replies (3)
Message 2 of 4

rkmcswain
Mentor
Mentor

For the first part, are you using AutoCAD or AutoCAD LT?

 

Also, you say layer"s". So I presume you want to turn them all off (or freeze) and then do the reverse?

What if their current state is some off and some on? Reverse that state or flat out turn them all off, then all on at the next toggle?

R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 3 of 4

Anonymous
Not applicable

I am using AutoCAD Mechanical 2019.  I have some notes that are on a layer named "CKNOTES" and I need a way to toggle the layer on and off.  I don't think that's going to be the issue.  What I'm really wondering about is how I can visually represent on the ribbon if the layer is on or off depending on the layer state.

0 Likes
Message 4 of 4

rkmcswain
Mentor
Mentor

You used to be able to (and perhaps still can) place a checkmark next to a pull-down menu item using a menu macro, but I don't know about swapping images on a ribbon item.

 

Perhaps it can be done with something other than a menu macro or autolisp.

R.K. McSwain     | CADpanacea | on twitter
0 Likes