# Event manager API call

**URL:** <https://tech-community.robotics.abb.com/t/event-manager-api-call/960>\
**Category:** RobotStudio\
**Created:** [December 13, 2006, 10:28am UTC](https://tech-community.robotics.abb.com/t/event-manager-api-call/960 "2006-12-13T10:28:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erik\_L](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Erik\_L](https://tech-community.robotics.abb.com/u/Erik_L)\
**Post date:** [December 13, 2006, 10:28am UTC](https://tech-community.robotics.abb.com/t/event-manager-api-call/960/1 "2006-12-13T10:28:54Z")

</div>

Hi all,

I need to create an event in the “Event manager” using RobotStudio 5.07.01 API. The event trigger is an I/O signal and the action is to attach a part to active tool with the setting “keep position”. Anybody knows how to do this?

/erik

---

<div class="post-metadata">

**Author:** ![Erik\_L](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Erik\_L](https://tech-community.robotics.abb.com/u/Erik_L)\
**Post date:** [January 10, 2007, 7:05am UTC](https://tech-community.robotics.abb.com/t/event-manager-api-call/960/2 "2007-01-10T07:05:00Z")

</div>

**Hi all again & Happy New Year,**

The purpose is to create a pick and place plugin for some customers. Today it quite boring and time consuming to attach and detach parts inside the event manager. I think I have managed to set up the event table actions and triggers but can’t figure out how to get it into the eventmanager.. :stuck\_out\_tongue:

Are they any RS heroes out there that can help out.?

**/e**

* * *

private void EventButt\_Click(object sender, EventArgs e)

{

CreateAttachedParts(); // create some parts to attach (prtA1,prtA2) ,gets active controller actVC

EventActivationMode EAM;

EAM = EventActivationMode.Simulation;

EventTableActionIO etActionIO =new EventTableActionIO();

etActionIO.Irc5Controller = actVC;

EventTableTriggerIO ettTriggerIO = new EventTableTriggerIO();

ettTriggerIO.Name = “USERDO1”; //the IO signal i would like to use

ettTriggerIO.Value = 0;

ettTriggerIO.Irc5Controller = actVC;

EventTableActionAttach etAction = new EventTableActionAttach();

etAction.AttachmentParent = prtA1;

etAction.AttachmentChild = prtA2;

etAction.MountObject = true; //(keep position?)

EventTableEntry ETE = new EventTableEntry();

ETE.EventTableTrigger = ettTriggerIO;

ETE.EventTableActions.Add(etAction);

ETE.EventTableActions.Add(etActionIO);

ETE.Cyclic = true;

ETE.Comment=“”;

ETE.EventActivationMode = EAM;

//And finally creates the entry

//Which is not possible because there are no constructors defined..

EventTableEntryCollection EvTablCollect= new EventTableEntryCollection();

EvTablCollect.Add(ETE); //

}

* * *

---

<div class="post-metadata">

**Author:** ![Johannes\_Weiman\_old\_account](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/johannes_weiman_old_account/32/3345_2.png) [@Johannes\_Weiman\_old\_account](https://tech-community.robotics.abb.com/u/Johannes_Weiman_old_account)\
**Post date:** [January 10, 2007, 12:41pm UTC](https://tech-community.robotics.abb.com/t/event-manager-api-call/960/3 "2007-01-10T12:41:00Z")

</div>

Hi Erik,

Typically you should do like this:  
Simulator.ActiveConfiguration.EventTable.EventTableEntries.A dd(ETE);

regards,  
Johannes

---

<div class="post-metadata">

**Author:** ![Erik\_L](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Erik\_L](https://tech-community.robotics.abb.com/u/Erik_L)\
**Post date:** [January 10, 2007, 1:20pm UTC](https://tech-community.robotics.abb.com/t/event-manager-api-call/960/4 "2007-01-10T13:20:52Z")

</div>

Wooooaaaaaaaa!!

Tack, tack, tack!

/e
