06-17-2019 10:06 AM
Hello community,
i have the Problem with automation of the ChnRainCalc function. With the following code i wan't to analyze some functions.
Set analyseGroup = calcRoot.ChannelGroups.Add("Rainflow_analyse_Group")'Create new group For i = 1 to Data.Root.ChannelGroups(4).Channels.Count Call Data.Root.ChannelGroups(4).Activate() RainInclFirstLastVal = False ClassNo = 100 ClassBegin = Data.Root.ChannelGroups(4).Channels(i).Properties("minimum").Value ClassEnd = Data.Root.ChannelGroups(4).Channels(i).Properties("maximum").Value ClassWidth = (ClassEnd - ClassBegin)/ClassNo ClassRangeWidth = (ClassNo * ClassWidth) RainChnContain = "No. of classes" RainMatTrans(1) = False RainMatTrans(2) = False RainOneParaCalc(1) = False RainOneParaCalc(2) = False RainOneParaCalc(3) = False RainOneParaCalc(4) = False RainSpecOnePara(1) = False RainSpecOnePara(2) = False RainSpecOnePara(3) = False RainSpecOnePara(4) = False Call ChnRainCalc("[4]/["&str(i)&"]","Automatic",1,0,"Cumulative") Next
I get the error message
Fehler: Es wurde keine Berechnung durchgeführt.
Does anyone know this error report and what is the real error behind the message?
06-17-2019 12:37 PM
Try
ClassBegin = Data.Root.ChannelGroups(4).Channels(i).Maximum ClassEnd = Data.Root.ChannelGroups(4).Channels(i).Minimum
06-17-2019 02:05 PM - edited 06-17-2019 02:08 PM
The Errormessage is still the same.
Additional i use the teachin function. The recorded script have the same error message.
07-09-2019 03:38 AM
I changed a bit your script. If this doesn't work, I need the dataset and the DIAdem version you are using.
dim oCalcRoot, oAnalyseGroup, oSourceGroup, oSourceGroupChns set oCalcRoot = Data.Root Set oAnalyseGroup = oCalcRoot.ChannelGroups.Add("Rainflow_analyse_Group") 'Create new group Set oSourceGroup = oCalcRoot.ChannelGroups(4) set oSourceGroupChns = oSourceGroup.Channels Call oSourceGroup.Activate() For i = 1 to oSourceGroupChns.Channels.Count RainInclFirstLastVal = False ClassNo = 100 ClassBegin = oSourceGroupChns(i).Minimum.Value ClassEnd = oSourceGroupChns(i).Maximum.Value ClassWidth = (ClassEnd - ClassBegin)/ClassNo ClassRangeWidth = (ClassNo * ClassWidth) RainChnContain = "No. of classes" RainMatTrans(1) = False RainMatTrans(2) = False RainOneParaCalc(1) = False RainOneParaCalc(2) = False RainOneParaCalc(3) = False RainOneParaCalc(4) = False RainSpecOnePara(1) = False RainSpecOnePara(2) = False RainSpecOnePara(3) = False RainSpecOnePara(4) = False Call ChnRainCalc(oSourceGroupChns(i), "Automatic", 1, 0, "Cumulative") Next
Greetings
Walter