Message 1 of 1
Get the name of ilogic rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there,
I want to get the rulename from a rule so i can set it to a string.
i found this, but for some reason it doesn't work:
<summary>Get or set the name of the rule.</summary>
</member>
I can loop tru all the rules of my document, but i cann't figure out why the single rule name is not working. I must miss something.
this is a part of a external rule where that i use to add a rule based on a text file, it checks if the rulename that i fill in exists in the current rule list of that file:
Format:HTML Format
Version:1.0
StartHTML: 165
EndHTML: 8499
StartFragment: 314
EndFragment: 8467
StartSelection: 314
EndSelection: 314
Version:1.0
StartHTML: 165
EndHTML: 8499
StartFragment: 314
EndFragment: 8467
StartSelection: 314
EndSelection: 314
'aanroepen Ilogicautomation
auto=iLogicVb.Automation
'declareren van rule en rules als object, rules is een lijst van alle aanwezige rules in het document
DimruleAsObject
DimrulesAsObject
rules=auto.rules(oDoc)
'teller klaarzetten
i=0
'Doorloop de aanwezige rules en controleer of er al een rule met gelijke benaming bestaat
If(NotrulesIsNothing)Then
'Doorloop de aanwezige rules en controleer of er al een rule met gelijke benaming bestaat
ForEachruleInrules
Ifrule.Name=RulenameThen
MessageBox.Show("Een rule met de naam: "&rule.Name&" bestaat al", "Title")
i=i+1
EndIf
Next
'voeg de rule toe, indien de naam nog niet bestond
Ifi=0Then
auto.AddRule(oDoc, Rulename,FileContents)
EndIf
can somebody give me a hint??
thanks