Family Parameter set by the width of Wall

This dynamo keeps producing unpredicted outputs. I followed one video of Gavin that places the Opening family at the intersection of the Duct & walls and set the parameters of the Opening family to the size of the opening I want. The width parameter is set by the width of the wall but every first instance is not equivalent to the width of the wall.
for better clarity, I have added images and script.

Opening 1


Naviswork 0.1.dyn (102.9 KB)

@jazzsharma200 ,

It should something like get and set…