- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Just figured it out....
You have to loop the namevalue map process as you would with any unknown array length
i converted the array list to a string array because it seems to work better.
Here is the Code
Rule 1
Dim NamesList As New ArrayList
NamesList.Add("Part_N")
NamesList.Add("Types")
NamesList.Add("Diam")
For k = 0 To NamesList.Count - 1
MessageBox.Show( NamesList(k) , "Works")
Next k
Dim Heading_Names As String() = CType(NamesList.ToArray(GetType(String)), String())
For g = 0 To Heading_Names.Length -1
MessageBox.Show( Heading_Names(g), "")
Next g
For z = 0 To Heading_Names.Length -1
Dim map As Inventor.NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap()
'map.Add("Arg1", "Arg1Value")
map.Add("Arg1", Heading_Names(z))
iLogicVb.RunRule("Rule7", map)
Next z
Rule 2
Arrays = RuleArguments("Arg1") If RuleArguments.Exists("Arg1")ThenMessageBox.Show("All My Arrays = " & Arrays , "Msg Box Test")
End If