How do I automate clicking of a WB custom button?
Options
![Ayush Kumar](https://us.v-cdn.net/6037473/uploads/userpics/RGJ3E8O4WFAG/n98CYBYJ7H6ZS.jpg)
Ayush Kumar
Member, Moderator, Employee Posts: 419
![Ansys Employee](https://us.v-cdn.net/6037473/uploads/badges/RVRDV39KPJ91.png)
![Solution Developer Community of Practice Member](https://us.v-cdn.net/6037473/uploads/badges/274G8C56SBE6.png)
I have created a WB custom button using the methodology mentioned on another SO post: Custom Button WB
Now, I would like to automate clicking on this button, in my process workflow. How do I do it?
Tagged:
0
Answers
-
This can be done by calling the event callback directly. The Custom button is attached to a
Toolbar
on WB as toolbarEntries
. So, first accessing the toolbar and then it's entry will provide access to theClick
event callback.Example:
custom_button_ext = ExtAPI.ExtensionManager.GetExtensionByName("CustomButtonWB") toolbar = custom_button_ext.Interface.Toolbars[0] button = toolbar.Entries[0] button.Click()
8