Select to view content in your preferred language

SOLVED: Cant access ModelBuilder tool code block for toolbox model/tool created in Arc Map

146
0
04-28-2025 02:04 PM
Labels (1)
NealBanerjee
Frequent Contributor

Hello!

 

Ive run into situation where I developed tools in ArcMap and need to run in Arc Pro (sometimes with some modifications).  One issue that I ran into is tools that had more complex calculations that required use of 'Code Blocks' (e.g. Calculate Field, Calculate Value, etc.), is when I opened in Pro, I no longer could see (or access) the code block (see first screen shot below).  However, if I hovered over the tool in modelbuilder, I could see the code in the popup (2nd screenshot).  If no changes were necessary, tool would run fine, but if I needed to made some change in the code block, I couldnt figure out how - very frustrating!

Fortunately after a few deep breaths, I realized the issue and solution.  In ArcMap one of the selectable 'Expression Type's is 'PYTHON_9.3'.  In Pro that is not an option (just Arcade, Python, and VBScript).  To fix the issue, simply change the 'Expression Type' to "Python" and then you should be able to see the code block (3rd screenshot)

Hope this saves frustation for others!

Neal

 

NealBanerjee_0-1745873673351.png   

NealBanerjee_1-1745873689750.png  

NealBanerjee_2-1745874226668.png

 

 

 

Tags (2)
0 Replies