08-23-2011 11:58 AM
Hi,
I would like to take values from a property file and plug them directly into parameter used to invoke dll calls.
I have looked at examples on how to use the property loader to input test limits, but I cannot figure out how to pipe into the params.
I have tried. <step name>.Module.<param name>
step.propertieslist[0].
Any ideas?
Thanks,
m
Solved! Go to Solution.
08-23-2011 01:57 PM
I'm gonna go out on a limb and say this is not possible. I'm confused as to why it's such a big deal for you to manually place a Local or FileGlobal down and put that as the parameter. Then have your property file write to the Local or FileGlobal.
If anything would work it would be: Module.AsDllModule.Parameters.Item(X).ArgVal But I tried that and it didn't work because the property doesn't exist. Even though I can use that same path and set the value in a different step from within TestStand.
I think the limitation is the Property Loader. I don't think it can call into the API like that. So you will have to set a variable that is not accessible through the API.
Regards,
08-23-2011 02:17 PM
A couple of reasons why I was investigating this approach. 1) I see that this works for test limits, etc which is nice. 2) If I can by-pass the middle man (local var) and go straight to the .dll parameter it certainly takes complexity out of the system.
08-23-2011 02:40 PM
I agree that it would be nice. The difference between limits and parameters though is that parameters are set dynamically. What I mean by that is you never know how many parameters a step will have until you define the module. Whereas the Limits are always set in stone. The only difference is the MultiNumeric Limit Test which is just an array that get's appended too with the same datatype. And the only acess to a parameters value is through the API unless it is a variable.
The other hard part is that you don't know the datatype of parameters. Any step can have any number of parameters as well as any datatype being passed to each individual parameter.
I think if you are set on NOT creating Locals or FileGlobals then you would need to create custom step types with subproperties that get assigned to the parameters. This could be even more painful though because now you have to maintain and support the custom step types.
The other option would be to create your own property loader step that could call in and set things in the API. HMMM now that would be an interesting project... 🙂