I´m searching for the Keywords in RTB-File or a function in VB, to toggle the status of the bitmap in the ribbon like this example here:
So with this button I can see, if the raster is ON (dark background) or OFF (light background).
How can I do this in my own ribbons. I have written some VB´s which toogle some preferences in drafting. So it is usful to see the status by the button.
I found something like that in an other discussion:
Private Sub _button1_Click(ByVal control As RibbonControl) _button1.Checked = Not _button1.Checked End Sub
But I do not no if this does what I want. Where do I have to set the button bitmap-filename in this solution?
Production: NX10.0.3 MP16, NX11.0.1 MP4
Development: Batch and VB Testing: NX12
Yesterday I asked a similar question for the NX Open Python API and today I discovered the solution myself. Although it is Python and not VB it may help you too:
I just noticed that in the NX Open C++ API and in the NX Open Python API there is the class
NXOpen.MenuBar.MenuButton and this class has a method ToggleStatus which does the job according to the documentation.
I know that you asked for VB and not for Python or C++ but I guess that this class and this method exists also in VB.