Select to view content in your preferred language

Bug: Primitive Overrides do not work for CIMTextSymbol (Dictionary Renderer)

378
2
Jump to solution
01-29-2026 04:15 AM
Labels (1)
imbachb
Regular Contributor

We'd like to be able to dynamically adjust text sizes. We have for example following symbol containing a CIMTextSymbol. We add the primitive name "label_symbol" to the level where the height of the text symbol should be configurable.

{
    "type": "CIMPointSymbol",
    "symbolLayers": [
        {
            "type": "CIMVectorMarker",
            "enable": true,
            "primitiveName": "label_r",
            "anchorPointUnits": "Relative",
            "dominantSizeAxis3D": "Z",
            "size": 10,
            "billboardMode3D": "FaceNearPlane",
            "frame": {
                "xmin": -7.5,
                "ymin": -5.0,
                "xmax": 7.5,
                "ymax": 5.0
            },
            "markerGraphics": [
                {
                    "type": "CIMMarkerGraphic",
                    "geometry": {
                        "x": 0,
                        "y": 0
                    },
                    "symbol": {
                        "type": "CIMTextSymbol",
                        "blockProgression": "TTB",
                        "depth3D": 1,
                        "extrapolateBaselines": true,
                        "flipAngle": 1,
                        "fontEffects": "Normal",
                        "fontEncoding": "Unicode",
                        "fontFamilyName": "Roboto",
                        "fontStyleName": "Bold",
                        "fontType": "Unspecified",
                        "haloSize": 0.75,
                        "haloSymbol": {
                            "type": "CIMPolygonSymbol",
                            "symbolLayers": [
                                {
                                    "type": "CIMSolidFill",
                                    "enable": true,
                                    "color": [
                                        0,
                                        0,
                                        0,
                                        255
                                    ]
                                }
                            ],
                            "angleAlignment": "Map"
                        },
                        "height": 8,
                        "hinting": "Default",
                        "horizontalAlignment": "Left",
                        "kerning": true,
                        "letterWidth": 100,
                        "ligatures": true,
                        "lineGapType": "ExtraLeading",
                        "offsetX": 33,
                        "offsetY": -23,
                        "symbol": {
                            "type": "CIMPolygonSymbol",
                            "symbolLayers": [
                                {
                                    "type": "CIMSolidFill",
                                    "enable": true,
                                    "primitiveName": "label_fill",
                                    "color": [
                                        255,
                                        255,
                                        255,
                                        255
                                    ]
                                }
                            ],
                            "angleAlignment": "Map"
                        },
                        "textCase": "Allcaps",
                        "textDirection": "LTR",
                        "verticalAlignment": "Center",
                        "verticalGlyphOrientation": "Right",
                        "wordSpacing": 100,
                        "billboardMode3D": "FaceNearPlane",
                        "primitiveName": "label_symbol"
                    },
                    "textString": "staffcomment/additionalinformation"
                }
            ],
            "scaleSymbolsProportionally": true,
            "respectFrame": true
        }
    ],
    "haloSize": 1,
    "scaleX": 1,
    "angleAlignment": "Display"
}

In the dictionary script we added the primitive override referencing the primitive name

keys += ';po:label_symbol|Height|22';

which however has no effect on the rendered symbol.

Is it not possible to change the height / size of a Text Symbol dynamically through primitive overrides?

Please find attached a zip containing the stylx file with the mentioned symbol and dictionary script. It is based on APP6-(E) but I removed all other symbols and reduced the dictionary script.

We're using ArcGIS Maps SDK v200.8 on Windows 10.

0 Kudos
1 Solution

Accepted Solutions
megan_r
Esri Contributor

Hello @imbachb ,

I noticed a few things looking at the style you provided. In the dictionary script the primitive name is label_symbol but in ArcGIS Pro it looks like the tag used on the text symbol is label_r. Those need to be the same for the override to work, so either update the script or the Text Symbol in ArcGIS Pro so the primitive names match.

In the dictionary script I also needed to change the primitive property used in order to get the text size to actually change. Instead of using 'Height', I tried 'Size' and that seems to work:

 

keys += ';po:label_symbol|Size|22';

 

 

Best,

Megan

View solution in original post

0 Kudos
2 Replies
megan_r
Esri Contributor

Hello @imbachb ,

I noticed a few things looking at the style you provided. In the dictionary script the primitive name is label_symbol but in ArcGIS Pro it looks like the tag used on the text symbol is label_r. Those need to be the same for the override to work, so either update the script or the Text Symbol in ArcGIS Pro so the primitive names match.

In the dictionary script I also needed to change the primitive property used in order to get the text size to actually change. Instead of using 'Height', I tried 'Size' and that seems to work:

 

keys += ';po:label_symbol|Size|22';

 

 

Best,

Megan

0 Kudos
imbachb
Regular Contributor

Hi @megan_r 

Thank you for the reply and the work-around. Yes, setting the size no the CIMVectorMarker seems to work, and it is more or less what we need.
It would be interesting to be able to change the height of the CIMTextSymbol via primitive overrides too, but changing the CIMVectorMarker size is good enough for now.

0 Kudos