Shared Variable of a structure losing structure "Type"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I'm in the process of coding my first iLogic project. I'm having an issue with a shared variable
I have one rule reading data from a CSV file and puting them into a customer parameter Structure.
Public Structure CustomParam Public n As Integer Public Name() As String Public Values As ArrayList End Structure
Dim oCustomParams As ArrayList
oCustomParams = ReadParam(oPath)
SharedVariable("oCustomParams") = oCustomParams
Dim oCustomParam As CustomParam
oCustomParam = ReadParam(oPath_single)
SharedVariable("oCustomParam") = oCustomParam
The data is transfered to other rules correctly and I can access all the data. Both a single variable and an ArrayList of variables work. My issue is that I can't "call" the structure type anymore.
Sub MySub (oCustomParam As CustomParam) ... End Sub Sub MySub (oCustomParam) ... End Sub
The first case will return a "Specified cast is not valid."
Not specifying the argument type will solve the issue. However, I would like if possible to specify the argument as a "CustomParam".
Is there any way to achieve this? Maybe a Structure is not the proper way to handle this. I don't have much coding experience so I may be looking at this wrong.
Thank you in advance for your time and answers!
