There is an event that keeps checking if the active file is a part, drawing or assembly. ?
Currently I have a loop but, but some commands are not active, such as when I click on a component the command edit part is not active, among others. As the hotkey "S" both gives and does not.
If anyone can help, I would appreciate it.
Thank.
This is a strange question. You are implying some sort of continuous loop that checks every second or so? That's not really how software works. When a model, property or other object changes, SolidWorks sends out an event that it has changed. There is an event on the SolidWorks object that tells you the current model has changed. If you then check the model type of the new model, you can then enable/disable buttons. I do this in my add-ins, I show a different task pane panel depending on the model type.
That being said, I'd love to learn how to set disable/enable my toolbar buttons as well