Can somebody help me out with the following??
Column1 = char(ColumnName(1));
Column2 = char(ColumnName(2));
Eval(Parse(EvalInsert("\[
obj << simulator(
1,
Factors(
AB << Random( ^distNameOne^( ^strParameterOne^ ) ),
^Column2^ << Random( ^distNameTwo^( ^strParameterTwo^ ) )
),
Responses(
:Column 3 << No Noise
),
Automatic Historam Update(1),
Simulate
);
]\")));
If I name the first column "AB" manually, the profiler works fine for it. However attempting to automatically use the column name as in Column2 does not work. Any ideas on how to get it to work?
Thanks
You're sending column actions to a string. Try these two variations:
:^Column2^ << Random( ^distNameTwo^( ^strParameterTwo^ ) )
column(^Column2^) << Random( ^distNameTwo^( ^strParameterTwo^ ) )
or maybe even
as column(^Column2^) << Random( ^distNameTwo^( ^strParameterTwo^ ) )
You're sending column actions to a string. Try these two variations:
:^Column2^ << Random( ^distNameTwo^( ^strParameterTwo^ ) )
column(^Column2^) << Random( ^distNameTwo^( ^strParameterTwo^ ) )
or maybe even
as column(^Column2^) << Random( ^distNameTwo^( ^strParameterTwo^ ) )
Thanks for the quick response.
At first your solution did not seem to work. Then, I decided to manually change the name of the columns to something simpler and that did the trick.
Any ideas why a column named something like "S/B nominal length-c" won't work, but if I renamed it to "SB nominal length c" it does work??
BTW, I used the following format:
:^Column1^ << Random
Or perhaps there's a way to have the script automatically remove any punctuation at the beginning?
Thanks
That column name won't work because of the forward slash. This construct should work though:
:name(^Column2^) << Random( ^distNameTwo^( ^strParameterTwo^ ) )
I get the following error when I tried that:
Name arg must be quoted string Line 5 Column 9: name(.....
You probably need quotes around the column name then.
:name("^Column2^") << Random( ^distNameTwo^( ^strParameterTwo^ ) )
Great, everything works like a charm. Thanks again!