CATIA中导出参数值到excel或者txt文本的两种方法 | 您所在的位置:网站首页 › 清明节时间用英语怎么表达 › CATIA中导出参数值到excel或者txt文本的两种方法 |
Sub ExportParametersToCSV() Dim sPath As String sPath = CATIA.FileSelectionBox("Export Parameters to .csv", "*.csv", CatFileSelectionModeSave) Dim oSelection Set oSelection = CATIA.ActiveDocument.Selection CATIA.Interactive = False oSelection.Clear oSelection.Search "Knowledgeware.Parameter,all" Open sPath For Output As #1 Dim i As Integer For i = 1 To oSelection.Count Dim oSelectedElement As SelectedElement Set oSelectedElement = oSelection.Item(i) Dim sElementName As String sElementName = oSelectedElement.Value.Name Dim sElementPath As String sElementPath = oSelectedElement.Value.Value sLine = sElementName + "," + sElementPath Print #1, sLine Next oSelection.Clear CATIA.Interactive = True Close #1 MsgBox "Done" End Sub |
CopyRight 2018-2019 实验室设备网 版权所有 |