Option explicit on Dim oAssDoc As Inventor.AssemblyDocument = ThisDoc.Document For Each oRefDoc As Document In oAssDoc.AllReferencedDocuments If oRefDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then iLogicVb.Automation.RunExternalRule(oRefDoc, "RP4711_Abmessungen") End If Next