I create a new SwAddin project in my visual studio,and I debug it.Then the solidworks application looks like this:
Now,I'd like to get these button by code to make them enable=false.How can I do that,anyone knows?Thank you.
The AddCommandItem method includes an argument that is a callback method for enabling/disabling the item. You can pass the name of a method as the parameter and the method will be called every time something happens that might cause the enable status to change. Based on conditions, you can decide whether or not the item should be enabled and return the appropriate value (0,1,2,3).
Retrieving data ...