11-01-2017
10:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
11-01-2017
10:37 AM
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