Surfer's Classed Post layer has a lot of options through the user interface that are now available via automation! For example, you can now change bin ranges, control proportional symbol sizing, save classes and more via automation. See below for specifications on how to use the new objects and methods in automation:
IClassedPostLayer has been to extended IClassedPostLayer2 with the following new methods/properties:
IClassPostLayer2 Object
Property | Description | Mapid |
---|---|---|
BinName | Returns/sets the name of the class at the specified bin. | 44248 |
BinSymbolSizeMin | Returns/sets the minimum bin symbol size. | 44249 |
BinSymbolSizeMax | Returns/sets the maximum bin symbol size. | 44250 |
BinLineColorMap | Returns the color map object used for all of the bins' symbol line colors. | 44257 |
BinFillColorMap | Returns the color map object used for all of the bins' symbol fill colors. | 44258 |
Method | Description | Mapid |
---|---|---|
SaveClasses | Saves CLS file for the classes. | 44251 |
SetBinSymbolsLineUniform | Sets the symbol line color and opacity for all bins. | 44252 |
ApplyBinLineColorMap | Applies BinLineColorMap's color map to all bins' symbols. | 44253 |
SetBinSymbolsFillUniform | Sets the symbol fill color and opacity for all bins. | 44254 |
ApplyBinFillColorMap | Applies BinFillColorMap's color map to all bins' symbols. | 44255 |
SetBinSymbols | Sets the symbol set and symbol for all bins' symbols. | 44256 |
BinName Property
Syntax
object.BinName(Index)
object.BinName(Index) = Name
Parameter | Type | Description |
---|---|---|
Index | Integer | The index of the class/bin we are trying to get/set the name of. |
Name | String | The new name of the class/bin being set. |
Example
This example demonstrates how to set the 3rd bin's class name to "New name".
IClassPostLayer2.BinName(3) = "New name"
BinSymbolSizeMin Property
Syntax
object.BinSymbolSizeMin
object.BinSymbolSizeMin = Size
Parameter | Type | Description |
---|---|---|
Size | Double | The new minimum bin symbol size. |
Example
This example demonstrates how to set the minimum bin symbol size to 0.2.
IClassPostLayer2.BinSymbolSizeMin = 0.2
BinSymbolSizeMax Property
Syntax
object.BinSymbolSizeMax
object.BinSymbolSizeMax = Size
Parameter | Type | Description |
---|---|---|
Size | Double | The new maximum bin symbol size. |
Example
This example demonstrates how to set the maximum bin symbol size to 1.4.
IClassPostLayer2.BinSymbolSizeMax = 1.4
BinLineColorMap Property
Syntax
object.BinLineColorMap
Example
This example demonstrates how to return the bin line colormap object and assign it to a variable for later use.
Set LineCM = IClassPostLayer2.BinLineColorMap
BinFillColorMap Property
Syntax
object.BinFillColorMap
Example
This example demonstrates how to return the bin fill colormap object and assign it to a variable for later use.
Set FillCM = IClassPostLayer2.BinFillColorMap
SaveClasses Method
Syntax
object.SaveClasses(File)
Parameter | Type | Required/Optional | Default | Description |
---|---|---|---|---|
File | String | Required | N/A | The filepath for the CLS file that our classes are being saved to. |
Example
This example demonstrates how to save classed post map's current classes to a file called "classes.cls" in my Downloads directory.
IClassPostLayer2.SaveClasses("C:\Users\David\Downloads\classes.cls")
SetBinSymbolsLineUniform Method
Syntax
object.SetBinSymbolsLineUniform(Color, Opacity)
Parameter | Type | Required/Optional | Default | Description |
---|---|---|---|---|
Color | srfColor enum | Required | N/A | The color all symbols' lines are set to. |
Opacity | Integer | Required | N/A | The opacity (in percentage) all symbols' lines are set to. |
Example
This example demonstrates how to set all the classed post map's symbols' lines to green, with an opacity of 85%.
IClassPostLayer2.SetBinSymbolsLineUniform(srfColorGreen, 85)
ApplyBinLineColorMap Method
Syntax
object.ApplyBinLineColorMap()
Example
This example demonstrates how to apply the classed post map's BinLineColorMap property, after loading it with the "Rainbow" preset.
IClassPostLayer2.BinLineColorMap.LoadPreset("Rainbow")
IClassPostLayer2.ApplyBinLineColorMap()
SetBinSymbolsFillUniform Method
Syntax
object.SetBinSymbolsFillUniform(Color, Opacity)
Parameter | Type | Required/Optional | Default | Description |
---|---|---|---|---|
Color | srfColor enum | Required | N/A | The color all symbols' fills are set to. |
Opacity | Integer | Required | N/A | The opacity (in percentage) all symbols' fills are set to. |
Example
This example demonstrates how to set all the classed post map's symbols' fills to blue, with an opacity of 49%.
IClassPostLayer2.SetBinSymbolsFillUniform(srfColorBlue, 49)
ApplyBinFillColorMap Method
Syntax
object.ApplyBinFillColorMap()
Example
This example demonstrates how to apply the classed post map's BinFillColorMap property, after loading it with the colormap saved in my 'rbgy.clr' file.
IClassPostLayer2.BinFillColorMap.LoadFile("C:\Users\David\Downloads\rbgy.clr")
IClassPostLayer2.ApplyBinFillColorMap()
SetBinSymbols Method
Syntax
object.SetBinSymbols(Index, Set)
Parameter | Type | Required/Optional | Default | Description |
---|---|---|---|---|
Index | Integer | Required | N/A | The symbol index (in the corresponding symbol set) all symbols are set to. |
Set | String | Optional | GSI Default Symbols | The symbol set which (along with the symbol index) decides what symbol all symbols are set to. |
Example
This example demonstrates how to set all the classed post map's symbols to the 3rd index ("Number 3") of the "Arial Black" symbol set.
IClassPostLayer2.SetBinSymbols(3, "Arial Black")
Comments
0 comments
Please sign in to leave a comment.