3dsmax attach spline

Hi,
I can’t figure out a way to attach two splines with maxscript without any user interaction
Do you have some suggestion?
Thanks

Multiple ways, you can use UIAccessor to confirm the dialog, you can use the .NET API through maxscript to call AttachShape on the SplineShape object, but probably the simplest is to use the Shape Booleans with the Attach option:

select sourceSpline
startObjectCreation ShapeBooleanObject

sourceSpline.appendOperand sourceSpline attachSpline on
sourceSpline.setOperationType 2 #attach
convertToSplineShape sourceSpline -- optional, depending on what you're after