Select to view content in your preferred language

change line width of SimpleFillSymbolStyle

1238
4
03-20-2018 11:33 AM
JeffRogholt
Emerging Contributor

Is it possible to change the fill line (not outline) width of a SimpleFillSymbolStyle?  We'd like to have the polygon fill be diagonal lines with a width of 4px.

Thanks,

Jeff

0 Kudos
4 Replies
NagmaYasmin
Esri Contributor

Hi Jeff,

You could create your own Fill Symbol with line width 4 as a .stylx file in ArcGIS Pro and use SymbolStyle class to access that .stylx file.

https://community.esri.com/community/developers/native-app-developers/arcgis-runtime-sdk-for-qt/blog... 

Hope that helps.

0 Kudos
JeffRogholt
Emerging Contributor

Thanks for the suggestion Nagma.  I have ArcGIS Pro but my time using it is very limited.  Do you have any documentation to create a Fill Symbol?

0 Kudos
NagmaYasmin
Esri Contributor

Hi Jeff,

I have created a video that shows how to create stylx file in ArcGIS Pro for Fill Symbol with your defined line width. 03.21.2018-13.56.49 

Attached is my .stylx file.

In addition, please take a look of this thread on how to use that .stylx file to render your feature layer.

https://community.esri.com/message/752670-how-to-create-render-from-symbol-stylex?et=watches.email.t... 

Hope that helps.

MichaelBranscomb
Esri Frequent Contributor

Hi Jeff,

Another tip: once you have followed Nagma's steps to create and export the stylx file from Pro and you have created a symbol from that via the API, you can call ToJson() on the symbol and get the JSON representation. You can then modify the JSON as you need to adjust it or create additional symbols. Use the modified JSON string(s) with the Symbol.FromJson() method (Symbol.ToJson Method) to create symbols.

Cheers

Mike