Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi there,

 

I would try the following:

Dim currentfilename As String
Dim choice As String
Dim length As String


currentfilename = ThisDoc.FileName(False)

choice = Parameter("FixedUnit_Curve")
length = Parameter("length")

'custom filepath
'SetTheFilePathHere = "C:\ ... your filepath ..."

'filepath same as the current ipt
SetTheFilePathHere = ThisDoc.Path

SetTheFilenameHere = currentfilename & " " & choice & " " & length


ThisApplication.CommandManager.PostPrivateEvent(kFileNameEvent, SetTheFilePathHere &"\" & SetTheFilenameHere & ".ipt")

Dim oCtrlDef
oCtrlDef = ThisApplication.CommandManager.ControlDefinitions.Item("AppFileSaveCopyAsCmd")
oCtrlDef.Execute

I assume that you are using a custom Parameter for the length as well? If that's the case you have to edit the parameter name in Line 9 to the one you are using.

Let me know if it worked :slightly_smiling_face: