krz177
Mechanical
- Jan 11, 2015
- 14
I am trying to find a way to bind a custom dll to an existing button in Solidworks. Basically when the user hits the print button, I want that action to trigger my code to run first, then once execution is completed, continue on with the normal print function. I am used to having this functionality when programming for NX by loading custom menu files that I can push out to the whole organization. I have not been able to find similar editing of the menu capability in Solidworks. Through my searching commandOpenPreNotify looks the most promising and in testing it will indeed trigger my function. My problem is isolating it to run just when the print button is hit. At the moment it will run when a user does anything in the software. It is my understanding that I can pass an integer to this function in order to specify on what existing command it should be triggered (please correct me if I'm wrong). If this is the case I am having issues finding what this integer would be. I latched on with my debugger and have set countless watch points trying to see the result of what menu item the user selects, but with no luck.
I just started API programming for Solidworks a few days ago. More or less I have to emulate the same custom functions I've programmed for NX and "port" them for Solidworks. I am making headway but this triggering of my custom functions is what is holding me back currently.
Using vb.net or c#,
Thankyou ahead of time
I just started API programming for Solidworks a few days ago. More or less I have to emulate the same custom functions I've programmed for NX and "port" them for Solidworks. I am making headway but this triggering of my custom functions is what is holding me back currently.
Using vb.net or c#,
Thankyou ahead of time