# User Defined Methods in Chart / SFC

**URL:** <https://forum.inductiveautomation.com/t/user-defined-methods-in-chart-sfc/26927>\
**Category:** Ignition\
**Tags:** python, ignition80\
**Created:** [July 27, 2019, 7:46am UTC](https://forum.inductiveautomation.com/t/user-defined-methods-in-chart-sfc/26927 "2019-07-27T07:46:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rttwge](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rttwge](https://forum.inductiveautomation.com/u/rttwge)\
**Post date:** [July 27, 2019, 7:46am UTC](https://forum.inductiveautomation.com/t/user-defined-methods-in-chart-sfc/26927/1 "2019-07-27T07:46:15Z")

</div>

Is it possible to create user define methods inside an SFC?

In my current situation an alternative would be to call a method in python module I have located on the server in C:\Program Files\Inductive Automation\Ignition\user-lib\pylib\ _my\_module_

I’m trying to get access to this in an SFC Transition using runScript(“my\_module.some\_method”, …) but I get an error saying “…in NameError: name ‘my\_module’ is not defined…”

Thanks,

Rick

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 27, 2019, 12:50pm UTC](https://forum.inductiveautomation.com/t/user-defined-methods-in-chart-sfc/26927/2 "2019-07-27T12:50:51Z")

</div>

Such modules have to be imported before use, and runScript offers no method to do so. You’ll have to write a stub function in a project or shared module that calls that function on runScript’s behalf.
