I want to add an model builder to the python

01-12-2017 05:39 AM
Occasional Contributor II

Hello everybody

I want to python code import to model builder, how can i do that?

I want to add this code to the model builder

python code 

>>> arcpy.DisconnectUser("Database Connections\\", "ALL")

Im using arcmap 10.4.1

0 Kudos
1 Reply
MVP Regular Contributor

Put the code in a Python script file (*.py) and create a script tool with the py file as source (What is a script tool?—Help | ArcGIS for Desktop ).  Then you can add the script tool to your model as an additional process.