Save Workspace 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 workspace file representing the current MapInfo Pro session. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Save Workspace As filespec [ Mode ( Default | Current ) ]  [ CharSet char_set ]

filespec is a string representing the name of the workspace file to create.

char_set a string constant, such as "WindowsLatin1".

Description

The Save Workspace statement creates a workspace file that represents the current MapInfo Pro session. The effect is comparable to the user choosing Save Workspace on the HOME tab, except that the Save Workspace statement does not display a dialog box.

When the Mode clause is set to Default, it saves the workspace without updating the current workspace title in MapInfo Pro application title bar. When set to Current, it saves the workspace and updates the current workspace title in MapInfo Pro application title bar.

The CharSet clause specifies a character set. The char_set parameter should be a string constant, such as "WindowsLatin1". If no CharSet clause is specified, MapBasic uses the system character set that is in use at runtime. See CharSet clause for more information. Using "UTF-8" as the workspace character set allows characters from any language to be represented.

To load an existing workspace file, use the Run Application statement.

Example

Save Workspace As "market.wor" 

See Also:

Run Application statement