Reply To: How can I call flowscript from C#

Forums 💬 FlowCanvas ⚙️ Support How can I call flowscript from C# Reply To: How can I call flowscript from C#

#21731
Gavalakis
Keymaster

    Hello again,

    There are two ways to call a flowScript from code:

    1) Custom Functions
    – In flowScript, create a ‘Custom Function’ node and implement that function. Here is a [LINK] to the documentation about Custom Functions (by the end of the page).
    – In code, you need to get a reference to the FlowScriptController that has the flowScript you want to call assigned and call ‘CallFunction’, something like this :

    2) Custom Events
    – In flowScript, create a ‘Custom Event’ node.
    – In code, you need to get a reference to the FlowScriptController again and use ‘SendEvent’, like this example:

    Custom Events are generaly best suited for simpler things, while Custom Functions are best for more complicated things, since they can also return a value if you want to.

    Please let me know if that helps, or if you need any more clarification.
    Thank you.