TaskInfo() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns information about a running or completed task. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

TaskInfo ( taskid_id, property )

task_id is the ID of a running or completed background task. Task IDs can come from a background clause in a MapBasic statement. Add-ins such as Raster or DriveTime can also create background tasks and task IDs.

property is the name of a property to return the value of. See the table below for property names.

Return Value

String

Task Properties

Name Value
Define PROPERTY_CREATETIME "CreateTime" 'datetime
Define PROPERTY_STARTTIME "StartTime" 'datetime
Define PROPERTY_ENDTIME EndTime" 'datetime
Define PROPERTY_CURRENTPROGRESS "CurrentProgress" 'integer progress towards Total
Define PROPERTY_TOTAL

"Total" 'integer - total number if progress is 100%

Define PROPERTY_CURRENTSTATUS "CurrentStatus" 'enum TaskStatus
Define PROPERTY_ISCANCELLATIONSUPPORTED

"IsCancellationSupported" 'logical

Define PROPERTY_ISRERUNNABLE

"IsReRunnable" 'logical

Define PROPERTY_ISPAUSESUPPORTED "IsPauseSupported" 'logical
Define PROPERTY_PROGRESSMESSAGE

"ProgressMessage" 'string

Example

print taskinfo(1, "CurrentProgress") / taskinfo(1, "Total")
print taskinfo(1, "CurrentStatus")