if you are in the assembly where it was mirrored the name of the file is normally "mirrororiginal part name"
Could you provide the API call, please?
Dim swApp As SldWorks.SldWorks
Dim Part As ModelDoc2
Dim i As Integer
Dim vModelPathName As Variant
Dim vComponentPathName As Variant
Dim vFeature As Variant
Dim vDataType As Variant
Dim vStatus As Variant
Dim vRefEntity As Variant
Dim vFeatComp As Variant
Dim nConfigOpt As Long
Dim sConfigName As String
Dim nRefCount As Integer
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
nRefCount = Part.Extension.ListExternalFileReferencesCount
Part.Extension.ListExternalFileReferences vModelPathName, vComponentPathName, vFeature, vDataType, vStatus, vRefEntity, vFeatComp, nConfigOpt, sConfigName
For i = 0 To nRefCount - 1
Debug.Print " Model path + name = " + vModelPathName(i)
Debug.Print " Component path + name = " + vComponentPathName(i)
Debug.Print " Feature = " + vFeature(i)
Debug.Print " Data type = " + vDataType(i)
Debug.Print " Status = " + Str(vStatus(i))
Debug.Print " Reference entity = " + vRefEntity(i)
Debug.Print " Feature component = " + vFeatComp(i)
Debug.Print " Configuration option = " & nConfigOpt
Debug.Print " Configuration name = " & sConfigName
Debug.Print " "
This is what I need, thanks a lot! :-)
I suppose I have to check the "datatype" and if it is a body then I can be
sure that I found the original part. Am I right?
If it is a mirrored part, then the first reference in the list should be the correct one. It is unlikely that that any features are before the mirror feature.
Alternatively, you can loop through the features in the feature tree and call ListExternalFileReferences on each feature.
It seems you are right. I tested the code with more different mirrored parts and the correct reference was always the first one in the list. So thank you very much for your help!