How can I get a script tool to accept input/output parameters within the notebooks environment

128
1
2 weeks ago
KedarBhaskar1
New Contributor

Hi everyone,

I have created a script in ArcGIS Notebooks which I want to connect to a custom script tool (pictured). Note that the  tool pictured below is stored in a toolbox which can be accessed from the catalog pane.

FB_Sctiptool.png

When I drag the script tool into notebooks it looks like this -

"C:\\Users\\Kedaravindan Bhaskar\\Documents\\ArcGIS\\Projects\\FBM_research\\FBTool\\firebreak.tbx\\FBCalc"

 Rather than - 

arcpy.management.ReclassifyField()

Basically, I want the script tool to accept input output parameters within Notebooks as in other script tools that come with ArcGIS Pro.

How can I get this script tool to accept input/output parameters within the notrbooks environment?

Please let me know if you need anything else from me. Thank you

Warm regards, Kedar

0 Kudos
1 Reply
Luke_Pinner
MVP Regular Contributor

Use arcpy.ImportToolbox:

toolbox = "C:\\Users\\Kedaravindan Bhaskar\\Documents\\ArcGIS\\Projects\\FBM_research\\FBTool\\firebreak.tbx"
arcpy.ImportToolbox(toolbox, "firebreak")
arcpy.FBCalc_firebreak(tool, parameters, etc...)

 

0 Kudos