CAD Report - Double or Triple occurences in ImportInstance

Hi all,
I am simply trying to use Bimoprh nodes to get the list of Linked and Imported CAD files in my Revit project.
The thing is it counted two many CAD Files:26 > I counted manually 19 links in Revit Links Menu.
So I tried with Revit API and Python, it have me also 19 Links.
The I looked closer to Bimorph nodes results and it gives me double or triple results for some of the CAD Links.

Does anyone knows why when you ask the list of ImportInstance of the project, it gives double or triple for some elements ??? And the test ImportInstance.IsLinked give True for all of them, even for all double or triple.

Ok I just figured it myself.
But I let the topic open if some people have the same trouble.

The answer is because of copy of the same CAD in one project. It counts as 1 Link but as several occurences. For 1 Link there are multiple ImportInstances.

@baud.dem a simple and pragmatic solution using python is collecting all ImportInstances - even duplicates and then use the set() function.
a set must not have duplicates and so you receive a list of unique ImportInstances

@Peter_Kompolschek, yes exactly I thought of that too :slight_smile:
Thank you