Message 1 of 11
Running a external rule instead of a regular rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to modify this to have it run a external rule on each part within assembly that has a specific rule in it. Anyone mind giving me a hand
Dim oDoc As AssemblyDocument = ThisDoc.Document
'define the ilogicAutomation
Dim iLogicAuto As Object
iLogicAuto = iLogicVb.Automation
Dim oRuleName As String = "Master_Parts_List"
Dim oRule As Object
For Each doc As Document In oDoc.AllReferencedDocuments
On Error Resume Next
oRule = iLogicAuto.GetRule(doc, oRuleName)
'run the rule
iLogicAuto.RunRuleDirect(oRule)
Next