If it was on .ipt level we could trigger it from the TOP-assembly with this rule. But i don't think it is possible to do this for .dwg.
'**********************************************************
'******************** Activate rule in parts. ********************
'**********************************************************
Sub Main
auto = iLogicVb.Automation
' Set Rule name
Dim ruleName As String
ruleName = "Rule name here"
' Get the active assembly.
Dim oAsmDoc As AssemblyDocument
oAsmDoc = ThisApplication.ActiveDocument
' Get all of the referenced documents.
Dim oRefDocs As DocumentsEnumerator
oRefDocs = oAsmDoc.AllReferencedDocuments
' Iterate through the list of documents.
Dim oRefDoc As Document
For Each oRefDoc In oRefDocs
Dim rule As Object
rule = auto.GetRule(oRefDoc, ruleName)
If (rule Is Nothing) Then
'Call MsgBox("No rule named " & ruleName & " was found in the document.")
Else
'MessageBox.Show(rule.Name, oRefdoc.displayname)
Dim i As Integer
i = auto.RunRuleDirect(rule)
End If
Next
End Sub