0 Replies Latest reply on Jul 23, 2015 1:31 AM by Michael Caulton

    Why would swChildComp.ReferencedConfiguration return the wrong config name?

    Michael Caulton

      I am using the code snippets below to recursively traverse an assembly but every so often if returns the wrong configuration. The part will be in the assembly but the wrong configuration is listed.

       

      Does anyone have any ideas why that would be the case?

       

      At the start

       

           swModel = swApp.ActiveDoc

       

           Run function that resolves all items

          

           swAssy = swModel

       

       

      Within recursive function

       

           vChildComp = swAssyDoc.GetComponents( False)

              For i = 0 To UBound(vChildComp) ' Process each of the assembly components

                      swChildComp = vChildComp(i)

                      sNameTemp = Path.GetFileName(swChildComp.GetPathName) + " {" + swChildComp.ReferencedConfiguration + "}"

              Next i