Select to view content in your preferred language

import stylex file into Portal as Web-Style

64
1
yesterday
MichaelNüßlein
Regular Contributor

I have a style file from ArcGIS Pro (stylex) containing polygon symbols that I'd like to import into my portal as a web-style using Python. The direct method of sharing the web style from ArcGIS Pro works.

Has anyone had any success with this?

I tried `createItem(gis, ItemProperties(item_type=ItemTypeEnum.STYLE.value, type_keywords=["polygonSymbol", "web2d"])`, but this only imports the stylex file. The comand in ArcGIS Pro (Share as Web Style) processes the style and imports a JSON file.

0 Kudos
1 Reply
MichaelNüßlein
Regular Contributor

Sorry i forgot that createitem is ma own  function:

def createItem(gis, properties, url=None):
   folders = gis.content.folders
   folder = folders.get()

   futureItem = folder.add(item_properties=properties, file=url)

return futureItem.result()

0 Kudos