SetView()
Summary
Sets the current view (and the current layer).
Syntax
SetView(string view_name)
| Argument | Contents |
|---|---|
| view_name | The new current view |
Notes
-
If the input view is mappable to a layer, SetView() sets the current layer to the corresponding layer. If the input view is not mappable, it sets the current layer to null.
-
If view_name is null, SetView() does nothing and returns immediately.
Example
old_view = GetView()
SetView("Sales")
// Do some stuff on the Sales view...
SetView(old_view)
Error Codes
| Error Type | Meaning |
|---|---|
| NotFound | The specified view does not exist |
See Also
| Function | Summary |
|---|---|
| GetView() | Gets the name of the current view |
| GetViews() | Gets information on views in the system or views associated with a layer |
| GetViewNames() | Gets a list of all views |
| GetViewLayer() | Gets the name of the map layer that corresponds to a view |
| SetLayer() | Sets the current layer (and the current view) |