How to save file in .x_t/parasolid format with Solid Edge API?
SolutionUser can use below code to save active document with Parasolid (.x_t) format.
Dim application As SolidEdgeFramework.Application = Nothing
Dim partDocument As SolidEdgePart.PartDocument = Nothing
Try
application = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application)
partDocument = CType(application.ActiveDocument, SolidEdgePart.PartDocument)
If partDocument IsNot Nothing Then
Dim NewName = "C:\Temp\Part1.x_t"
partDocument.SaveBody(NewName, SolidEdge.Constant.Interop.SaveBodyConstants.seSaveBodyAsParasolidText, 0, 1, 1)
End If
Catch ex As System.Exception
Console.WriteLine(ex)
Finally
Console.WriteLine("plms")
End Try