Hello
I have created this macro to export Specification tree from catia to excel or text file format
but i am getting this error and i dont know how to correct it
here is the VBSCRIPT
Option Explicit
Sub CATMain()
'Launguage - VB SCRIPT
'Macro - Export Specification tree
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Declare Variables
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim myDoc As Document
Dim myPart As Part
Dim partDoc As PartDocument
'Set Variables Values
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set myDoc = CATIA.ActiveDocument
Set myPart = CATIA.ActiveDocument.Part
Set partDoc = CATIA.ActiveDocument
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Export Script
Dim exportFormat As String
exportFormat = InputBox("Enter the format to export the tree as._ type 'xls' or 'txt'")
If exportFormat <> "xls" Then
If exportFormat <> "txt" Then
MsgBox "Did not enter the file format"
Else
Dim partName As String
partName = InputBox("Enter the name of the part")
Dim location As String
location = "D:\CatiaMacro"
partDoc.ExportData location & partName & "." & exportFormat, "txt"
End If
End If
End Sub
Here is the Error
Thanks in advance
I have created this macro to export Specification tree from catia to excel or text file format
but i am getting this error and i dont know how to correct it
here is the VBSCRIPT
Option Explicit
Sub CATMain()
'Launguage - VB SCRIPT
'Macro - Export Specification tree
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Declare Variables
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim myDoc As Document
Dim myPart As Part
Dim partDoc As PartDocument
'Set Variables Values
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set myDoc = CATIA.ActiveDocument
Set myPart = CATIA.ActiveDocument.Part
Set partDoc = CATIA.ActiveDocument
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Export Script
Dim exportFormat As String
exportFormat = InputBox("Enter the format to export the tree as._ type 'xls' or 'txt'")
If exportFormat <> "xls" Then
If exportFormat <> "txt" Then
MsgBox "Did not enter the file format"
Else
Dim partName As String
partName = InputBox("Enter the name of the part")
Dim location As String
location = "D:\CatiaMacro"
partDoc.ExportData location & partName & "." & exportFormat, "txt"
End If
End If
End Sub
Here is the Error
Thanks in advance