Initializing dynamic plugins

The default spreadcount for a dynamic plugin’s outputs is 1.

When my dynamic plugin is constructed, I need to initilialize some other things.

It seems to me that if I do this in the constructor, I can’t use any of the node’s output spreads yet. For what I want to do, I need these values though.

Is there a way to push my init code to a moment when the output spreads already have their default values, without the need to do it in evaluate with an if statement?

to access the import fields in the constructor you have to use the attribute ‘ImportingConstructor’. here is a short code example from elias:

public MyNode(Output(“Foo”) ISpread myFooSpread)
myFooSpread.SliceCount = 42;

… no text …