StandardError: Unable to transform the body! : ILLEGAL_ENTITY_MODIFICATION -- entity modification outside API_BEGIN/END block

Hi,
I have build a script to place multiple panels on different Surfaces in different directions.
To make this possible I`ve made a simple python loop. There are still some problems to solve but the script works on small Surfaces as you can see below.

When I make the Surfaces bigger I`m getting the following error. StandardError: Unable to transform the body! : ILLEGAL_ENTITY_MODIFICATION – entity modification outside API_BEGIN/END block
Does anyone have an idea how to solve this?
Wouter Hilhorst

Need the python code to help here.

The whole script is attached, the piece with the python script is orange, you can find the code there. Additionally I attached a printscreen underneath
image
dakpannen20200307.dyn (155.7 KB)

2 Likes

I had a play with the script, and based on the fact it’s working until a certain scale I think it might be hitting a limit for how much geometry the iteration can generate.

Try breaking the workflow into two python nodes (one for Y, one for Z) and see if that allows it to finish. The panel is quite small and is always the same size, so it takes longer the bigger the wall gets.

To be honest I would consider Rhino Inside instead of Dynamo also, the geometry is quite wavy/complex and would be better handled using something like box/UV mapping in Grasshopper.

1 Like

Thanks! I`ll keep you posted.

Like you advised I added an extra step in the array with the use of the Autodesk.Solid.ByUnion. First it makes an array of 8 elements and joines them. Then it moves this 1st array as a single solid to the Surfaces and it creates the 2nd array. It doesn`t give any errors or crash anymore. Thanks again Gavin! :+1:

2 Likes