Cancel
Showing results for 
Search instead for 
Did you mean: 

Set a uniform proctime on a SingleProc by code

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

I need to set a uniform proctime on a SingleProc by code. The SingleProc have previously had a constant proctime. 

The uniform proctime is in a table (as a string) which I want to read from. At this point my code looks like this:

 

Secs := root.Methods.GeneralOtherData["String", "CMM_Efterarbete_Proctime"]
?.setSubAttribute("ProcTime", "Type", "Uniform")
?.ProcTime := str_to_time(Secs)

 

The parameter Secs returns the string "5:00, 4:00:00". This returns the error "Invalid time specification". Does anyone have any tips on how to solve this?

3 REPLIES 3

Re: Set a uniform proctime on a SingleProc by code

Siemens Phenom Siemens Phenom
Siemens Phenom
you'll have to provide the two parameters separately as shown in the model

Regards

Always consider using the AttributeExplorer!

Re: Set a uniform proctime on a SingleProc by code

Siemens Phenom Siemens Phenom
Siemens Phenom
var Lower := "5:00" var Upper := "4:00:00" SingleProc.setSubAttribute("ProcTime", "Type", "Uniform") SingleProc.ProcTime.setParam("Uniform",str_to_time(Lower),str_to_time(Upper)) in case you´re not on 14 yet ...

Regards

Always consider using the AttributeExplorer!

Re: Set a uniform proctime on a SingleProc by code

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

Thank you for the help, it worked!