Triggering a signal from C#

I’m trying to trigger a string signal of a component from inside a C# plug in.
I can get the component, and then the behaviour:

var sig= component.FindBehavior(“MyStringSignal”) as IStringSignal;

I was expecting sig to have some sort of method for triggering the signal?
I have tried things like:
sig.SetValue(“Value”, “MyMessage”);
to no avail. Is what I want to do actually possible? And if so, how do I go about it?

Simply set the ISignal.Value property.
someSignal.Value = “new value”;

Also note that signals only raise their value change events when simulation is running.

Thanks,

signals only raise their value change events when simulation is running.

this was my problem, I had not pressed play.

1 Like