Assemblies "ICollection"


hi i am trying to add an element to an assembly.

but am failing to create an ICollection.

how do i create one?
<div class=“comment-body”>

here is my code:

i am getting error after error as i don’t know how to build a collection???

dataEnteringNode = IN

for i in range(0,len(assemblies)):

OUT = assemblies



Hey Peter,

Just to check, did you create your assemblies in the same script? From the API guide:

“The static Create() method of the AssemblyInstance class is used to create a new assembly instance in the project. The Create() method must be created inside a transaction and the transaction must be committed before performing any action on the newly created assembly instance.”

If it is a committed assembly, then maybe try the following:



Dimitar thannk you, that really helped a lot.

didn’t know that a collection is that easy to build…

tx peter


Technically the method doesn’t build a collection, but an IList (which is a .NET derivative, i.e. the Iron part in IronPython) that has identical properties to an ICollection. I found it easier to translate the python list into an IList than to an ICollection.

I’m still trying to wrap my head around all the different containers. I found some more info about the multitude of containers in .NET here:


cool, i will study that tonight, tx again!


if it helps, same topic: