Using Collector to retrieve CAD Links and Import Instaces

Hello,

I am able to get the CAD Link Type with the collector in a Python Node below but not the instance when I use “WhereElementIsNotElementType()”.

CADLinks = FilteredElementCollector(doc).OfClass(CADLinkType).WhereElementIsElementType().ToElements()

How can I get a list of all CAD Instances in a doc?

I am sure there is a package out there that can do this but I was keen on learning how to do it.

Thank you.

Hi @Joaquim_Agostinho1,

Replace .OfClass(CADLinkType). by .OfClass(ImportInstance).

2 Likes

fantastic!
Many thanks @Alban_de_Chasteigner