There is a dedicated help file for the SQC chart installed with ProcessBook, "SQCVBA.chm". It includes documentation for GetPlotTime.
The SQCSymbolDefinition Object GetPlotTime Method returns the currently used values for the Plot Times.
GetPlotTime (ByRef StartType As StartTypeEnum, ByRef vStartTime As Variant, ByRef vEndTime As Variant)
The type of the time scale for this plot. This is an enumerated type. See Notes below for a definition of the StartTypeEnum. Input parameter.
This is the value that specifies together with the StartType the start time to be used for the plot. It is either a number of samples, the name of a tag, or a PI-ProcessBook range represented in a string. Output parameter.
The End Time in PI-ProcessBook time range format. Output parameter.
The StartType parameter was invalid. It must be a valid StartType Enum value.
Thanks Rhys - I did find the documentation that had that in it, but unlike other functions it does not provide an example, and I couldn't manage to figure out how to structure the call so that it actually works. There don't appear to be any examples anywhere in these forums or the tech support site either.
Dim oSQCDef as SQCSymbolDefinition Dim stStartType as StartTimeEnum Dim vStart as Variant Dim vEnd as Variant Set oSQCDef = SQCSymbol1.GetDefinition() stStartType = sqcSamplesBeforeEnd vStart = 20 vEnd = "*" oSQCDef.SetPlotTime stStartType, vStart, vEnd oSQCDef.GetPlotTime stStartType, vStart, vEnd