OpenFigure()
Summary
Creates a figure window from a file.
Syntax
figure_name = OpenFigure(string file_name, array options)
| Argument | Contents |
|---|---|
| file_name | The path and file name of the figure |
| Options | Type | Contents |
|---|---|---|
| Activate Macro | String | The name of a macro that is called whenever the window is activated |
| Aspect Ratio | 2 integers | The aspect ratio of the window (height, width) |
| Click Macro | String | The name of a macro that is called when the user clicks on the window |
| Close Macro | String | The name of a macro that is called when the user closes the window from the system menu |
| Done Macro | String | The name of a macro that is called after the window is closed |
| Menu | String | The menu associated with the window |
| Position | 2 integers | The screen location of the window (x, y) |
| Size | 2 integers | The screen size of the window (x, y) |
| Toolbar | String | The toolbar associated with the map window |
Returns
The name of the figure window.
Notes
-
The position and size of the window are expressed as percentages of the Maptitude frame.
-
The attached menu and toolbar are automatically displayed whenever the figure window is activated.
-
If the menu, toolbar, activate macro, close macro, or click macro is not specified, CreateFigure() uses the default specified with SetDefaults(). If a figure window specific default was not specified with SetDefaults() then CreateFigure() uses the generic default.
Example
figure = OpenFigure(c:\\myfile.fig",
{{"Position", 0, 0},
{"Size", 100, 100}})
Error Codes
| Error Type | Meaning |
|---|---|
| Error | The file_name is invalid or the file could not be opened or has the wrong format or an invalid option was specified |
See Also
| Function | Summary |
|---|---|
| CloseFigure() | Closes a figure window |
| CreateFigure() | Creates a new window containing a figure |
| OpenFigureFromAnnotation() | Creates a new figure window from a figure that appears in a layout |
| SaveFigure() | Saves a figure to a file |
| SetDefaults() | Sets default menus, toolbars, and macros. |