Custom AddIns
In this article:
If you find yourself rewriting the same functions for different experiments, or if you would like to extend EventIDE with new functionality, consider developing your own custom AddIns. EventIDE provides a straightforward framework for creating custom elements that integrate directly into the experiment design environment. Custom AddIns allow you to create new elements, implement reusable functionality, add specialized stimulus or signal processing features, and tailor EventIDE to your specific research requirements.
Creating Custom AddIn
Before creating your first AddIn, install Microsoft Visual Studio Community Edition, which is available free of charge and provides all necessary tools for AddIn development.
Once Visual Studio is installed:
Open EventIDE.
Navigate to Application Menu → My AddIns.
Click Create my AddIn.

The New AddIn Wizard will open.
New AddIn Wizard
The New AddIn Wizard simplifies the creation of a new AddIn project. The wizard allows you to:
Specify the AddIn name.
Select the root folder where all your custom AddIns will be stored.
Create a dedicated subfolder for the new AddIn.
Automatically generate one or more example element templates.

Available template types include:
Template | Description |
Blank Element | Basic element template with minimal functionality. |
Visual Element | Template for elements that display visual content. |
Signal Element | Template for signal acquisition or processing elements. |
Randomized Element | Template that supports randomization functionality. |
After configuring the wizard, click OK. EventIDE will automatically generate the project and open it in Visual Studio.
Managing Custom AddIns
All created AddIn projects are stored as Visual Studio solutions (.sln files).
The list of available AddIns can be viewed at Application Menu → My AddIns. From this menu you can:
Open existing AddIn projects.
Create new AddIns.
Understanding the Custom Element Template
EventIDE AddIns are developed using C# and the .NET framework 4.8. The generated Visual Studio solution already contains references to the EventIDE development libraries, allowing you to immediately begin implementing custom functionality.
Each generated template contains a fully functional development framework for a custom EventIDE element. The template includes:
Relevant EventIDE base classes.
Interfaces exposed by the EventIDE core.
Property definitions.
Runtime callback interfaces.
Serialization support.
This significantly reduces the amount of code required to create new elements.
Inheriting from an EventIDE Base Class
Every custom element must inherit from one of the EventIDE base element classes, such as:
clElementThe base class provides the core functionality required for integration into the EventIDE editor and runtime engine.
Required Class Attributes
Custom element classes must include the following attributes:
[Export(typeof(IElement))]
[Serializable]These attributes are already included in the generated templates and allow EventIDE to discover and load the element.
Creating Element Properties
The properties you define in your element class become the user interface shown in EventIDE's Properties panel.
For example:
public int Duration { get; set; }would create an editable property that can be modified directly within EventIDE.
For maximum compatibility and reliability, it is recommended to use standard value types such as:
int
double
bool
string
Property Change Notifications
Whenever a property value changes, EventIDE should be notified so the user interface can update accordingly. Add a property change notification:
NotifyPropertyChange(nameof(Duration));This informs EventIDE that the property has been modified.
Property Attributes
EventIDE provides several custom property attributes that can be used to control how properties behave within the editor.
For example:
[IsRelevantProperty()]These attributes can be used to:
Control property visibility.
Restrict property usage.
Modify property behaviour.
Improve editor usability.
Adding Code Snippets
If your custom element should contain an editable code snippet, implement the ISnippetOwner interface. You must also declare the snippet type in the constructor:
AddSnippet(stSnippetType.Trigger);This enables EventIDE's built-in code editor for the specified snippet category. Code snippets are commonly used for:
Trigger generation
Custom calculations
Runtime logic
Device control
Runtime Callbacks
Many custom elements require interaction with the EventIDE runtime engine. To receive runtime events, implement one or more of the provided callback interfaces:
IElementWith...The generated template includes all available callback interfaces and handlers. Depending on your requirements, you can:
Keep only the callbacks you need.
Remove unused interfaces and handlers.
Implement custom runtime behavior.
Examples of runtime callbacks include:
Experiment initialization
Experiment start and stop
Frame updates
Signal processing
Data collection events
Compiling and Activating an AddIn
Once development is complete:
Build the project in Visual Studio.
Return to EventIDE.
Open Application Menu → AddIns Manager.
Locate your compiled AddIn.
Enable the AddIn.
Restart EventIDE.
After restarting, EventIDE will load the custom AddIn and make its elements available for use.
Using Custom Elements
To add your custom elements to an experiment:
Open the Event ribbon.
Click Add Element.
Navigate to the Custom Elements category.
All elements provided by activated AddIns will appear in this category and can be used just like any built-in EventIDE element.
