# Get ToolControlBase.Apply event

**URL:** <https://tech-community.robotics.abb.com/t/get-toolcontrolbase-apply-event/7996>\
**Category:** Developer Tools\
**Created:** [December 1, 2017, 9:35am UTC](https://tech-community.robotics.abb.com/t/get-toolcontrolbase-apply-event/7996 "2017-12-01T09:35:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DenisFR](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@DenisFR](https://tech-community.robotics.abb.com/u/DenisFR)\
**Post date:** [December 1, 2017, 9:35am UTC](https://tech-community.robotics.abb.com/t/get-toolcontrolbase-apply-event/7996/1 "2017-12-01T09:35:57Z")

</div>

Hello,  
I want to update my SmartComponent (who read RapidData) when I apply modification.  
I see that a ToolControlBase.Apply exists, but I can’t find where this is declared as this is not static.

---

<div class="post-metadata">

**Author:** ![DenisFR](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@DenisFR](https://tech-community.robotics.abb.com/u/DenisFR)\
**Post date:** [December 5, 2017, 10:27am UTC](https://tech-community.robotics.abb.com/t/get-toolcontrolbase-apply-event/7996/2 "2017-12-05T10:27:29Z")

</div>

Hello,  
I’ve found how should to do, but this doesn’t work:

```auto
using ABB.Robotics.RobotStudio.Environment;
...
		public override void OnLoad(SmartComponent component)
		{
			base.OnLoad(component);
			//Connect to Apply Button
			CommandBarControl commandBarControl = UIEnvironment.RibbonTabs["RAPID"].Groups["Controller"].Controls["RapidApplyMenu"];
			if (commandBarControl!=null)
			{
				((CommandBarPopup)commandBarControl).ClickButton.ExecuteCommand += ClickButton_ExecuteCommand;
				((CommandBarButton)((CommandBarPopup)commandBarControl).Controls["RapidApplyAll"]).ExecuteCommand += ClickButton_ExecuteCommand;
				((CommandBarButton)((CommandBarPopup)commandBarControl).Controls["RapidModuleApply"]).ExecuteCommand += ClickButton_ExecuteCommand;
			}
			string s = "";
		}

		private void ClickButton_ExecuteCommand(object sender, ExecuteCommandEventArgs e)
		{
			throw new NotImplementedException();
		}

```

ClickButton\_ExecuteCommand is never called…

Does RobotStudio.UI.Rapid.EditorManagement{Void ApplyAll\_ExecuteCommand(System.Object, ABB.Robotics.RobotStudio.Environment.ExecuteCommandEventArgs)} raise event?

---

<div class="post-metadata">

**Author:** ![DenisFR](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@DenisFR](https://tech-community.robotics.abb.com/u/DenisFR)\
**Post date:** [July 17, 2019, 5:06pm UTC](https://tech-community.robotics.abb.com/t/get-toolcontrolbase-apply-event/7996/3 "2019-07-17T17:06:03Z")

</div>

Any news?
