Using the Process Analyst > Process Analyst for Developers > Automation Model > IPen.PutHorizontalAxisTimeSpan [Method]

IPen.PutHorizontalAxisTimeSpan [Method]

Sets the start and end time of this pen.

Defined As

Parameters

startTime

[in] Indicates the beginning date and time without milliseconds of the time span in UTC format.

startMs

[in] Indicates the milliseconds component of the start time.

endTime

[in] Indicates the end date and time without milliseconds of the time span in UTC format.

endMs

[in] This will contain the milliseconds component of the end time.

Execution Result

If the function succeeds the return value will be Success. If an argument is bad then the return value will be InvalidArgument. If an argument is out of range then the return value will be InvalidArgument. If the pen is deleted then the return value will be GeneralFailure. If any other unexpected error occurs the return value will be GeneralFailure.

Remarks

The Process Analyst only supports setting its axis in UTC (Universal Co-ordinated Time) format. This means you need to convert from local to UTC format yourself to make the axis display correctly in local time. Cicode provides several functions to do these conversions.

Limits

The horizontal axis has an upper limit of 1/1/2100 12:00:00.000 and a lower limit of 1/1/1900 12:00:00.000. The minimum span is 100 milliseconds. The maximum span is 200 years.

See Also

IPen.GetHorizontalAxisTimeSpan [Method]

Calling Syntax

Assumes you have passed a valid pen object into the function.

[VBA]

Sub Example(pen As Object)
Dim startDate As Date
Dim endDate As Date
Dim startMs As Integer
Dim endMs As Integer
startDate = CDate("16/6/2004 11:30:00")
endDate = CDate("16/6/2004 12:29:00")
startMs = 0
endMs = 0
pen.PutHorizontalAxisTimeSpan startDate, startMs, endDate, endMs
End Sub

[Cicode]

FUNCTION Example(OBJECT hPen)
REAL startDate;
REAL endDate;
startDate = StrToDate("16/6/04") + StrToTime("9:30:00");
endDate = StrToDate("16/6/04") + StrToTime("10:29:00");
startDate = TimeToOLEDate(startDate, 0); // Convert to UTC
endDate = TimeToOLEDate(endDate, 0); // Convert to UTC
_ObjectcallMethod(hPen, "PutHorizontalAxisTimeSpan", startDate, 0, endDate, 0);
END