04-12-2012 03:40 PM
Can I create a sequence that has a variable number of parameters?
If not, Can I pass an array of objects as a paramater?
In the sequence code:
for (i=0; i< Parameters.Params.GetNumElements(); i++) { object o = Parameters.Params[i]; // Do something with o }
In the above case, can I call the sequence by putting a "new object[] {(double(2.0)}" as the parameter value?
For example:
call VarParams
Params = PropertyObject.SetPropertyObject (Engine.NewPropertyObject (valueType, asArray, typeName, options))
04-12-2012 04:18 PM
Not only can you pass an array of different sizes but you can also make a parameter an empty container and fill it with any container. The problem is you have to access it correctly within the subsequence. I can see a practical use for the Array but not really for the container.
Your last question regarding creating params dynamically: I would have a local variable that is in the Value for the parameter and then just change the local to what you want in the PreExpression.
Hope this helps,