Select to view content in your preferred language

Loading a text symbol from a stylx file

648
3
Jump to solution
11-09-2022 05:32 AM
jamc_70
Emerging Contributor

Hi all, I'm hoping somebody can point me in the right direction.

We are using a mobile style file (.stylx) to store our graphics symbols, but we currently create text symbols programmatically. We would like to change this and load the text symbols from the same style file, so they can all be maintained in the same place.

However we cannot get it to work, and I just wanted to check if this is a supported scenario, and if so, is there a particular technique for using it?

In our experiments, when using SearchSymbolsAsync, text symbols in the style file are never found, even though they are definitely there.

Even when using GetDefaultSearchParametersAsync, which is supposed to return all of the possible input values, when I inspect the results the names and classes of the text symbols are missing - it's like text symbols are being ignored.

Any help or pointers gratefully received.

 

0 Kudos
1 Solution

Accepted Solutions
PreetiMaske
Esri Regular Contributor

I looked further into this and it appears to be as designed. ArcGIS Runtime only supports three SymbolStyle classes which are line, points and polygon symbols. Reason for excluding the text symbols class and essentially other symbol types that are available in ArcGIS Pro is that ArcGIS Runtime does not have publicly known multilayer symbol types to represent those CIM symbol types. 

View solution in original post

0 Kudos
3 Replies
dotMorten_esri
Esri Notable Contributor

I'm fairly certain that text symbols always gets converted to vector CIM symbols. TextSymbols aren't great for sharing, since a certain device or PC might not have the font installed that the text symbol relies on, so those symbols are vectorized so it won't be an issue running on different systems.

0 Kudos
PreetiMaske
Esri Regular Contributor

I looked further into this and it appears to be as designed. ArcGIS Runtime only supports three SymbolStyle classes which are line, points and polygon symbols. Reason for excluding the text symbols class and essentially other symbol types that are available in ArcGIS Pro is that ArcGIS Runtime does not have publicly known multilayer symbol types to represent those CIM symbol types. 

0 Kudos
jamc_70
Emerging Contributor

Thanks both for your answers and for the explanation.

0 Kudos