Create Point statement - 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

Creates a point object. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Create Point 
	[ Into { Window window_id | Variable var_name } ] 
	( x, y )
	[ Symbol... ] [ Priority n ] [ Name framename ]

window_id is a window identifier.

var_name is the name of an existing object variable.

x, y specifies the location of the point.

The Symbol clause specifies a symbol style.

n is an integer value indicating the Z-Order value of objects (frames) on the Layout window.

framename is a string representing the name for this item in a Layout window.

Description

The Create Point statement creates a point object.

If the statement includes the optional Into Variable clause, the object will be stored in the specified object variable. If the Into clause specifies a window identifier, the object will be stored in the appropriate place in the window (for example, in the editable layer of a Map window). If the Into clause is not provided, MapBasic will attempt to store the object in the topmost window; if objects may not be stored in the topmost window (for example, if the topmost window is a grapher) no object will be created.

The x and y parameters use whatever coordinate system MapBasic is currently using. By default, MapBasic uses a longitude, latitude coordinate system, although the Set CoordSys statement can re-configure MapBasic to use a different coordinate system. Note that MapBasic's coordinate system is independent of the coordinate system of any Map window. Objects created on a Layout window, however, are specified in paper units: each x-coordinate represents a distance from the left edge of the page, while each y-coordinate represents the distance from the top edge of the page. For details about paper units, see Set Paper Units statement. By default, MapBasic uses inches as the default paper unit. To use a different paper unit, use the Set Paper Units statement.

Note: If you need to create objects on a Layout window, you must first issue a Set CoordSys Layout statement.

The optional Symbol clause specifies a symbol style; see Symbol clause for more details. If no Symbol clause is specified, the Create Point statement uses the current symbol style (the style which appears in the Symbol Style dialog box).

When creating a clone statement or saving a workspace, MapInfo Pro normalizes the priority of frames to a unique set of values beginning with one (1). Use the Priority clause to assign the Z-Order of the newly created object frame on the Layout window.

The Name clause assigns a name to a frame in the Layout window. If a name is assigned, it is written to the workspace (WOR) file and the workspace version updates to 1500.

See Also:

CreatePoint() function, Insert statement, Symbol clause, Update statement