SetDefaultDisplay()
Summary
Saves current display settings for a layer to a geographic file.
Syntax
SetDefaultDisplay(string layer_name, string filename)
| Argument | Contents |
|---|---|
| layer_name | The name of the layer |
| filename | The file name of a file to contain the layer default display settings |
Notes
-
If a geographic file has default display settings, the layer is displayed with those style settings whenever the file is added to an existing map with AddLayer() or AddCDFLayer().
-
The filename argument should be identical to the name of the geographic file, and have an extension of .STY. It should not include a disk drive or path. The file is created in the same location as the geographic file.
-
The default settings include layer style, theme settings, and selection set display settings.
Example
SetLineColor("Streets|", ColorRGB(44000,22000,0)
SetLineWidth("Streets|", 2.0)
SetDefaultDisplay("Streets", "streets.sty")
Error Codes
| Error Type | Meaning |
|---|---|
| Error | The layer_name or filename is syntactically invalid |
| NotFound | There is no layer with the specified name |
See Also
| Function | Summary |
|---|---|
| AddCDFLayer() | Adds a layer from a compact format geographic file to a map |
| AddLayer() | Adds a layer from a standard geographic file to a map |