@manhgt214 ,
This topic can help you too ʳʰʸᵗʰᵐ|FamilyInstances.RetrieveNestedComponents vs GetSubComponent - Revit - Dynamo (dynamobim.com)