AnsweredAssumed Answered

Get External References API is not working as expected

Question asked by Ravi A on Nov 11, 2014



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!!!