Hi,
I have the following code below. My intent is to get all the instance partnumbers from all the documents in my activedocument.
I expect that the variable "nam" below will give me XXXXXXX.1 ,XXXXXXX.2, ...,XXXXXX.n
but the variable just returns XXXXXXXX.CATPART, XXXXXXXX.CATPART,....,XXXXXXXX.CATPART with no instance numbering.
I think nam = docus.Item(k).Name is the wrong approach but I do not know any other approach.
Any suggestions/solutions?
'------------
Sub CATMain()
Dim docus As Documents: Set docus = CATIA.Documents
Dim r As Integer
Dim i As Integer: i = docus.Count
For k = 1 To i
Dim nam As String: nam = docus.Item(k).Name
MsgBox nam
Next
End Sub
I have the following code below. My intent is to get all the instance partnumbers from all the documents in my activedocument.
I expect that the variable "nam" below will give me XXXXXXX.1 ,XXXXXXX.2, ...,XXXXXX.n
but the variable just returns XXXXXXXX.CATPART, XXXXXXXX.CATPART,....,XXXXXXXX.CATPART with no instance numbering.
I think nam = docus.Item(k).Name is the wrong approach but I do not know any other approach.
Any suggestions/solutions?
'------------
Sub CATMain()
Dim docus As Documents: Set docus = CATIA.Documents
Dim r As Integer
Dim i As Integer: i = docus.Count
For k = 1 To i
Dim nam As String: nam = docus.Item(k).Name
MsgBox nam
Next
End Sub