You could use code injector to add rule into a file and run it?
It looks promising, but when taking a closer look to the screenshot it can do only ipt, aim and idw.
I'm dealing here with DWG.
Sorry about that, it looks as DWG is added later on and they kept the old screenshot.
So by now i was able to "inject " a line of code that triggers an external ilogic rule.
Now just finding a way of triggering this without manual labour....
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
Thanks Jefkee for this code, my approuch for ipt would be set the trigger on iproperty change and than in the top assy BOM change the revision number ( or other property) I didn´t check this out yet, because I´m still dealing with my DWG´s.