IPen.GetHorizontalAxisTimeSpan [Method]
- Last UpdatedJul 18, 2023
- 1 minute read
Returns the start and end time of this pen in local or UTC time format.
Defined As
-
[VBA] GetHorizontalAxisTimeSpan(startTime As Date, startMs as Integer, endTime as Date, endMs as Integer, localTime as Boolean)
-
[Cicode] GetHorizontalAxisTimeSpan (REAL startTime, INT startMs, REAL endTime, INT endMs, INT localTime)
-
[C++] HRESULT GetHorizontalAxisTimeSpan (DATE* startTime, short* startMs, DATE* endTime, short* endMs, VARIANT_BOOL localTime)
Parameters
startTime
[out] This will contain the beginning date and time without milliseconds of the time span.
startMs
[out] This will contain the milliseconds component of the start time.
endTime
[out] This will contain the end date and time without milliseconds.of the time span.
endMs
[out] This will contain the milliseconds component of the end time.
localTime
[in] Indicates whether the times returned are in local time or UTC. True = -1, False (0) = UTC.
Execution Result
If the function succeeds, the return value will be Success. If an argument is bad, the return value will be InvalidArgument. If the pen is deleted, the return value will be GeneralFailure. If any other unexpected error occurs, the return value will be GeneralFailure.
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
pen.GetHorizontalAxisTimeSpan startDate, startMs, endDate, endMs, True
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
REAL startDate;
REAL endDate;
INT startMs;
INT endMs;
_ObjectCallMethod(hPen, "GetHorizontalAxisTimeSpan", startDate, startMs,
endDate, endMs, -1);
END