Strange problem now - the first method below simply does not work with a SingleProc, for the life of me cannot see what I am doing wrong (when I can get back to work I will try methods 2 and 3 with it - for now raising this problem)
<processObject>.setSubAttribute ( "ProcTime", "formula", "<actual formula>")
<processObject>.ProcTime.setParam( "Formula", eg "1+2")
<processObject>.setAttribute ( "ProcTime", 5)
I made 2 dummy MakeIndex objects in the HybridLine to investigate, the ParallelProc works with all name and line locations but the SingleProc simply spits the dummy (F8 properties show it does have a ProcTime attribute)
It must be an obvious reason but I simply cannot see it ...
Please check, if the proctime of your station
is set to formula (s.b.) before setting the formula by station.setSubattribute(...)
Got two birds :-
<< I'll make sure I use a mix of both, to keep future options open. Might find out some interesting pros and cons of each with use.
<< will experiment a bit and post back with some concrete examples
with one stone :-
The setSubAttribute method does not work if the object's attribute type is not Formula,
however setParam changes the attribute type to Formula, so use it across the board.
// MakeIndexer = Parallel Station with ProcTime a Const /* First one below fails, second one works root.AsIsLine . MakeIndexer . setSubAttribute( "ProcTime", "Formula", "2:01 -- +A+HR#59 Injection Moulding M=1 F=1"); */ root.AsIsLine . MakeIndexer . ProcTime.setParam( "Formula", "2:01 -- +A+HR#59 Injection Moulding M=2 F=1");
Today is International Emoji Day