Creating Transition Fitting for Two Selected Ductworks


I’m trying to create a dynamo script that creates a Transition fitting for two selected Ductworks. “Mepfitting.ByCurves” does the trick but it is not working for same sized ductworks. Is there a way to force it to connect always as Transition Fitting?