Private Sub Form_click()
Dim objApp As Object
Dim objFeatures As Object
Dim objFeature As Object
'连接Solidedge与VB
Set objApp = GetObject(, "solidedge.application")
Set objFeatures = objApp.ActiveDocument.Parts
Open "d:\bidapeng.txt" For Output As #12
For Each objFeature In objFeatures
Debug.Print objFeature.Name
Write #12, objFeature.Name
Next
Close #12
End Sub