I have a small routine that I am trying to use to get a text list of unsaved documents in my CATIA V5 session. I think I'm doing something that CATScript doesn't like, but should be okay in Visual Basic. When I run the script it doesn't like my method of adding to the PartList.
Please point out my (hopefully) simple error.
Thanks,
Jeff
Code:
Sub CATMain()
Dim AllParts
Dim OpenPart
Dim QueryPart as string
Dim PartList as string
Dim J as integer
Set AllParts = CATIA.Documents
J = 0
For Each OpenPart In AllParts
QueryPart = OpenPart.Name
If OpenPart.Saved = False Then
PartList.Add(QueryPart)
J=J+1
End If
Next
MsgBox "There are " & J & " unsaved documents"
MsgBox PartList
End Sub
Please point out my (hopefully) simple error.
Thanks,
Jeff