Slab.SetEdgeConnection for multiple surfaces - solution exception error [SOLVED]


At the beginning I’d like to show you my script, which should set up the correct properties to deconstructed plates.

There is an error “Solution exception: object reference not set to an instance of an object”.
Any suggestion why it appears and how to fix it?

From the provided picture, I would assume that you need to “graft” the Slab input


You can see my “data structure” in the picture below.

I’ve tried this one, erorr still appears.

Please find script and model attached, maybe it will be helpful. (5.8 MB)


Looks like that you were setting some “nulls” edge connections and indexes and the component doesn’t like it :slight_smile: .

Below, a proposed solution that should work. (17.4 KB)

I am going to slightly improve the “set edge connection” as it does not look fully user friendly

Great input as always from your side.
Yeah for component it works, but overall order of the edges looks messy and some of them are missing:

I gues, that without “nulls” edges are randomly prescribed to the surface.

have a look at the following script (16.8 KB)

Can you just “setEdgeConnection” without creating a new one?

There is a Bug in constructing the surface again which changes the order of the edge

1 Like

Yes, in this case is even better for me to not creating a new one. Thanks a lot!
It’ll be nice to fix this bug, as I suppose there will be some case, where creatring a new one will be necessary :slight_smile: