Jegsaran
Automotive
- Dec 16, 2020
- 42
Good day to everyone!!
I am using Catia V5, for one of my project I need to get the link type of all elements in the links of document window as shown in the below snip.
I'm able to get the linktype for elements where pointed document is there using the below code.
But for items which doesn't have pointed documents, I'm unable to fetch the data.
Any help on this is highly appreaciated.
Thanks in advance.
I am using Catia V5, for one of my project I need to get the link type of all elements in the links of document window as shown in the below snip.
I'm able to get the linktype for elements where pointed document is there using the below code.
But for items which doesn't have pointed documents, I'm unable to fetch the data.
Code:
Dim stiEngine As stiEngine
Dim stiDbItem As stiDbItem
Dim StiChildren As Object
Dim S As String
Set stiEngine = CATIA.GetItem("CAIEngine")
Set stiDbItem = stiEngine.GetStiDBItemFromAnyObject(partDoc)
Set StiChildren = stiDbItem.GetChildren()
For i = 1 To StiChildren.count
Dim linkType 'As CATBSTR
linkType = StiChildren.linkType(i)
S = StiChildren.Item(i).GetDocumentFullPath()
Debug.Print "Attribute Link " & i & ": " & linkType & "Path: " & S
Next i
Any help on this is highly appreaciated.
Thanks in advance.