# How to call C# based Plugins in Python?

**URL:** <https://forum.opentap.io/t/how-to-call-c-based-plugins-in-python/246>\
**Category:** Technical\
**Tags:** python, plugin, opentap-sdk, faq\
**Created:** [February 25, 2021, 8:52pm UTC](https://forum.opentap.io/t/how-to-call-c-based-plugins-in-python/246 "2021-02-25T20:52:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushik.santhanam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/kaushik.santhanam/32/208_2.png) [@kaushik.santhanam](https://forum.opentap.io/u/kaushik.santhanam)\
**Post date:** [February 25, 2021, 8:52pm UTC](https://forum.opentap.io/t/how-to-call-c-based-plugins-in-python/246/1 "2021-02-25T20:52:34Z")

</div>

In case you have an instrument or a DUT that has a plugin written in C#, you can still use that in a Python plugin very easily.

In the below example, `"PowerAnalyzer"` is an C# Instrument Plugin that is provided by `"OpenTap.Plugins.Demo.Battery"`. It contains a measure current method.

We can use it in Python as shown below:

1. Use `clr.AddReference("<dll name>")` to import the C# dll.
2. Add the PowerAnalyzer as a setting for the python test step
3. Call the PowerAnalyzer methods directly from python

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/1X/bc7ea8abf86433593c6ca2639b311de3668d7ef9.png)
