And to add to the code by @Ralf_Krieg which would be for an internal rule, the below are for external rules where you have to refer to the parameter using parameter snippet found here.

NewFileName = ThisDoc.Path & "\" & Parameter("DIA") & "x" & Parameter("LENGTH") & ".ipt"
MessageBox.Show(NewFileName, "Title")
ThisDoc.Document.SaveAs(NewFileName,True)
Or by using variables declared as string you can reuse the parameters and can make it easier to read,navigate and update.
Dim oDia,oLength As String
oDia = Parameter("DIA")
oLength = Parameter("LENGTH")
NewFileName = ThisDoc.Path & "\" & oDia & "x" & oLength & ".ipt"
MessageBox.Show(NewFileName, "Title")
ThisDoc.Document.SaveAs(NewFileName,True)
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan