0 Replies Latest reply on Nov 11, 2014 6:02 AM by Ravi A

    Get External References API is not working as expected

    Ravi A



      Document Manager Get External References API is not working for some documents.

      Its repeating the same reference file as many times.

      The see below code and output of this code


              ' Get external references

              dmExtRefOption = dmDocMgr.GetExternalReferenceOptionObject

              dmExtRefOption.Configuration = "Default"

              dmExtRefOption.NeedSuppress = True

              dmSearchOpt = dmDocMgr.GetSearchOptionObject()

              dmExtRefOption.SearchOption = dmSearchOpt

              dmSearchOpt.SearchFilters = (SwDmSearchFilters.SwDmSearchExternalReference + SwDmSearchFilters.SwDmSearchForPart)

              numExtRefs = dmDoc.GetExternalFeatureReferences(dmExtRefOption)

              extRefs = dmExtRefOption.ExternalReferences

              refConfigs = dmExtRefOption.ReferencedConfigurations

              If (numExtRefs > 0) Then

                  For i = 0 To numExtRefs - 1

                      Console.WriteLine("External reference: " & extRefs(i))



                  Console.WriteLine("No external references in the part document.")

              End If



      Is there any changes in my code?


      Thanks in Advance!!!