Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
tdant
in reply to: zaidi_drafter

Your rule starts by looking at the part, not the parent assembly file. Since the part type is not a kAssemblyDocumentObject, the IF is ignored and your rule has no effect at all. Try this.

 

oCompDef = ThisDoc.Document.ComponentDefinition
oAssyOccurrences  = ThisDocument.ComponentDefinition.Occurrences

iLogicVb.RunRule("Test")

Dim oOccurrence As ComponentOccurrence
For Each oOccurrence In oAssyOccurrences If oSubOccurrence1.DefinitionDocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then iLogicVb.RunRule(oSubOccurrence1.Name,"Test") End If Next