Message 1 of 2
Execute the external rule based on the opened Document
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have written an ilogic code to open a specific assembly.
Select A in the form inside the assembly called blankassy.iam
and run the code to get the assembly A.iam.
I want to get it and execute the 'TestRule' external rule based on A.iam.
The code below is the completed code so far.
However, the external rule is executed based on blankassy.iam, not A.iam.
I want to execute the external rule based on the opened A.iam.
Does anyone know how to solve this?
Thank you in advance.
Sub Main
Dim oDoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim TYPE As String = Parameter("TYPE")
Dim modPath As String
If TYPE = "A" Then
modPath = "C:\Temp\A.iam"
Else if TYPE = "B" Then
modPath = "C:\Temp\B.iam"
End if
Dim oDocument As AssemblyDocument = ThisApplication.Documents.Open(modPath, True)
oDocument.Activate()
iLogicVb.RunExternalRule("TestRule")
End Sub