Hello
I didn't quite understand the order of saving, so for now I wrote the iLogic code, which converts the file into step format, gives it a name that will is equal to the part number, and saves it to the folder where the original file is located.
Please specify what you need))
Sub Main
' Get the STEP translator Add-In.
Dim oSTEPTranslator As TranslatorAddIn = ThisApplication.ApplicationAddIns.ItemById("{90AF7F40-0C01-11D5-8E83-0010B541CD80}")
If oSTEPTranslator Is Nothing Then
Exit Sub
End If
Dim oContext As TranslationContext = ThisApplication.TransientObjects.CreateTranslationContext
Dim oOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
If oSTEPTranslator.HasSaveCopyAsOptions(ThisApplication.ActiveDocument, oContext, oOptions) Then
' Set application protocol.
' 2 = AP 203 - Configuration Controlled Design
' 3 = AP 214 - Automotive Design
oOptions.Value("ApplicationProtocolType") = 3
oContext.Type = kFileBrowseIOMechanism
Dim Path As String = ThisDoc.Path
Dim Name As String = iProperties.Value("Project", "Part Number")
Dim oData As DataMedium = ThisApplication.TransientObjects.CreateDataMedium
oData.FileName = Path & "\" & Name & ".stp"
Call oSTEPTranslator.SaveCopyAs(ThisApplication.ActiveDocument, oContext, oOptions, oData)
End If
End Sub