# Initializing dynamic plugins

**URL:** <http://forum.vvvv.org/t/initializing-dynamic-plugins/7713>\
**Category:** question\
**Created:** [September 16, 2011, 11:39pm UTC](http://forum.vvvv.org/t/initializing-dynamic-plugins/7713 "2011-09-16T23:39:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ft](http://forum.vvvv.org/letter_avatar_proxy/v2/letter/f/999999/32.png) [@ft](http://forum.vvvv.org/u/ft)\
**Post date:** [September 16, 2011, 11:39pm UTC](http://forum.vvvv.org/t/initializing-dynamic-plugins/7713/1 "2011-09-16T23:39:26Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tonfilm](http://forum.vvvv.org/user_avatar/forum.vvvv.org/tonfilm/32/406_2.png) [@tonfilm](http://forum.vvvv.org/u/tonfilm)\
**Post date:** [September 17, 2011, 12:30pm UTC](http://forum.vvvv.org/t/initializing-dynamic-plugins/7713/2 "2011-09-17T12:30:52Z")

</div>

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

> code(lang=csharp):  
> ImportingConstructor  
> public MyNode(Output(“Foo”) ISpread myFooSpread)  
> {  
> myFooSpread.SliceCount = 42;  
> }

---

<div class="post-metadata">

**Author:** ![ft](http://forum.vvvv.org/letter_avatar_proxy/v2/letter/f/999999/32.png) [@ft](http://forum.vvvv.org/u/ft)\
**Post date:** [September 17, 2011, 1:40pm UTC](http://forum.vvvv.org/t/initializing-dynamic-plugins/7713/3 "2011-09-17T13:40:54Z")

</div>

Thanks!  
… no text …
