I am trying to get the referenced configurations of the child parts in a drawing view but it is not working as expected.
Dim RootModel As SldWorks.ModelDoc2 = swView.ReferencedDocument - Gets the modeldoc for the current view
Dim sConfig = swView.ReferencedConfiguration - Gets the configuration name of the active view, works for both part and assembly files
I then try and use the code below to get the child components if the view is of an assembly.
Dim AllComp As Object = swView.ReferencedDocument.GetComponents(False)
'Fill out config name and if profile lists
For i = 0 To UBound(AllComp)
sTempConfig = AllComp(i).ReferencedConfiguration
Debug.Print(i.ToString + " " + AllComp(i).ReferencedConfiguration + " " + AllComp(i).GetSuppression.ToString)
If the view is unchanged from when drawing was first opened it works fine and the data makes sense. if the view has been changed using "swView.ReferencedConfiguration = sConfig". the data no longer makes sense as it still reflects the original models data.
Why am I not getting the correct data? All I want is the suppression state and configuration name of the child parts in the drawing view.