- globalmapper.SetLineFeatureClassDrawStyle(LineFeatureClass_t16 aFeatureClass, GM_LineStyle_t aLineStyle) GM_Error_t32
-
Sets the default style and font to use for drawing lines with the given line classification. Pass None for the line style to reset the default drawing style to the default style for that classification of line.
Typically, when modifying the drawing style of a line class you will want to call GetLineFeatureClassDrawStyle to get the current drawing style, then just change what you need, then pass your copy in to this function.
- Parameters:
-
aFeatureClass (LineFeatureClass_t16) – Feature class to set draw style for
aLineStyle (GM_LineStyle_t) – New style to use for line class (None to reset to default)
- Returns:
-
Error Code
- Return type:
-
GM_Error_t32
Example
The following is an example of SetLineFeatureClassDrawStyle.
import globalmapper as gm
# Line class for an LFC_SHORELINE
err_GetLineFeatureClassDrawStyle, line_style = gm.GetLineFeatureClassDrawStyle(21)
line_style.mFont.mWeight = 200
### START SAMPLE
err_SetLineFeatureClassDrawStyle = gm.SetLineFeatureClassDrawStyle(21, line_style)
### END SAMPLE
# Reset the changes made in this sample
err_SetLineFeatureClassDrawStyle1 = gm.SetLineFeatureClassDrawStyle(21, None)
assert (
gm.GM_Error_None == err_GetLineFeatureClassDrawStyle
), f"GetLineFeatureClassDrawStyle: Expected {gm.GM_Error_None}, got {err_GetLineFeatureClassDrawStyle}"
assert (
gm.GM_Error_None == err_SetLineFeatureClassDrawStyle
), f"SetLineFeatureClassDrawStyle: Expected {gm.GM_Error_None}, got {err_SetLineFeatureClassDrawStyle}"