Message 1 of 2
Launch iLogic rule from .net -> changing name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi. I have mad a vb.net routine, to automatically launch a specific rule.
The launch works, however after each time I run the program, a _1 is added to the
Rulename:
Update Filestructure_1_1_1_1_1_1_1_1
Any other suggestion on how to run a rule, or can someone tell me why this is happening?
/Michael Christoffersen
Sub LaunchRule(ByVal sRuleName As String) Try For Each oAddIn As ApplicationAddIn In mInvApp.ApplicationAddIns If oAddIn.DisplayName.Contains("iLogic") Then oAddIn.Activate() Dim iLogicAuto As Object = oAddIn.Automation Dim rules As Object rules = iLogicAuto.rules(mInvApp.ActiveDocument) If (Not rules Is Nothing) Then For Each Rule As Object In rules If InStr(Rule.Name, sRuleName, Microsoft.VisualBasic.CompareMethod.Text) Then ' Rule.run() iLogicAuto.runrule(mInvApp.ActiveDocument, Rule.Name) Exit Sub End If Next End If End If Next Catch ex As Exception End Try End Sub