dzamoshnikov
Starting Member
USA
1 Posts |
Posted - Sep 07 2014 : 7:25:52 PM
|
I'm trying to create a solidworks addin. When I create a menu I have to create a call back using the name I place in the create menu function. Can I do something in visual assist that automatically creates a callback function from the selection?
Add menu Item --- mCommandGroup.AddCommandItem2("PDF", 0, "", "Save model as PDF", 0, "PDFItemClicked", "PDFEnable", 1001, itemType);
"PDFItemClicked" is one callback. "PDFEnable" is another callback.
"PDFItemClicked" Callback --- public void PDFItemClicked() { }
"PDFEnable" Callback --- public int PDFEnable() { // disable the PDF return 0; }
*** These callbacks are defined in a separate class; the taskpanehost class.
Is it possible to add these callbacks to a separate class by just highlighting the "PDFItemClicked" text, right clicking, and selecting "Create callback"? Will it automatically be created in the correct class (file)?
|
|