{"id":175571,"date":"2011-06-24T18:40:46","date_gmt":"2011-06-24T18:40:46","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=175571"},"modified":"2018-12-18T11:32:46","modified_gmt":"2018-12-18T19:32:46","slug":"considerations-when-exporting-a-model-to-a-python-script","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script","title":{"rendered":"Considerations when exporting a model to a Python script"},"author":3991,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23341],"tags":[24321,24331,24341],"industry":[],"product":[36991],"class_list":["post-175571","blog","type-blog","status-publish","format-standard","hentry","category-analytics","tag-geoprocessing","tag-modelbuilder","tag-python","product-arcgis-desktop"],"acf":{"short_description":"Since the release of ArcGIS 9, you have been able to export models created in ModelBuilder to a Python script.","flexible_content":[{"acf_fc_layout":"content","content":"<p>Since the release of ArcGIS 9, you have been able to export models created in ModelBuilder to a Python script. While this option is valuable in helping you see how tools and environments are used in a scripting environment, there are many instances when your exported model will not work as expected.<\/p>\n<p>This article explains why the option to export models to Python is intended to be used as a learning aid for understanding how tools and environments are accessed in Python. As models become more sophisticated to include techniques such as iteration or in-line variable substitution, this export option becomes less useful.<\/p>\n<p>In recent releases of ArcGIS, new ways for understanding how geoprocessing tools and environments are used in Python are provided and documented.<\/p>\n<ol>\n<li><b>Tool Documentation \u2013\u00a0<\/b>The help for every geoprocessing tool includes one or more Python samples, and many of those samples include Python scripting techniques such as using loops, if\/else logic, and exception handling.<\/li>\n<li><b>Copy as Python snippet \u2013\u00a0<\/b>Any time you execute a geoprocessing tool in ArcGIS, you can go to the Results window, right click on the result and\u00a0<i>Copy as a Python snippet<\/i>. You can paste this snippet in the Python window or any Python script.<\/li>\n<li><b>Python window \u2013\u00a0<\/b>All Python functionality is exposed through the Python window. It is a fully interactive window and a useful location to learn Python and experiment with code. Skills learned here can be applied to larger, more sophisticated scripts. Tools or functions that already have been executed, can be recalled, edited and re-executed. The content can also be saved to a new script.<\/li>\n<\/ol>\n<p>The\u00a0<b>Export &gt; To Python Script<\/b>\u00a0option will remain a part of ModelBuilder. However, only simple models will work when exported.<\/p>\n<p>Let\u2019s first look at a simple model shown in figure 1a\u00a0below. This model is comprised only of built-in geoprocessing tools and the workspace environment is set in the model properties. Exporting the model to Python creates a working script as shown in figure 1b.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/edn1.esri.com\/blogimages\/gp\/062411_1817_ExportModel1.png\" alt=\"\" \/><\/p>\n<p><i>Figure 1a: Simple model<\/i><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/edn1.esri.com\/blogimages\/gp\/062411_1817_ExportModel2.png\" alt=\"\" \/><\/p>\n<p><i>Figure 1b: Simple model exported to Python<\/i><\/p>\n<p>The model shown in figure 2a below will\u00a0<em>not work<\/em>\u00a0when exported to Python. This model includes an iterator (<a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/\/00400000000w000000.htm\" target=\"_blank\" rel=\"noopener\">Iterate Multivalue<\/a>), which executes the model for each dataset connecting to it, and uses variable substitution. The exported script in figure 2b does not include any iteration logic and will not work as expected when executed. In this case, you need to add the correct looping statements and modify the local variables.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/edn1.esri.com\/blogimages\/gp\/062411_1817_ExportModel3.png\" alt=\"\" \/><\/p>\n<p><i>Figure 2a: A model that uses iteration and variable substitution.<\/i><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/edn1.esri.com\/blogimages\/gp\/062411_1817_ExportModel4.png\" alt=\"\" \/><\/p>\n<p><i>Figure 2b: Results from a model exported containing iteration and variable substitution.<\/i><\/p>\n<p>Figure 2c shows the updated Python script where the local variables are updated and the iteration logic is added.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/edn1.esri.com\/blogimages\/gp\/062411_1817_ExportModel5.png\" alt=\"\" \/><\/p>\n<p><i>Figure 2c: Updated script<\/i><\/p>\n<p>Here is a list of things to consider before exporting models to Python:<\/p>\n<ol>\n<li>If your model uses an iterator, the iteration logic will not be exported and will have to be replaced with looping statements in Python.<\/li>\n<li>If your model used a\u00a0<a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/A_quick_tour_of_using_Model_Only_tools\/002w00000020000000\/\" target=\"_blank\" rel=\"noopener\">Model only tool<\/a>\u00a0such as Merge Branch, Collect Values, or Calculate Value, these tools will not run properly in Python; they may execute without error, but nothing happens and your script doesn\u2019t work as expected. In some cases, the Python script will fail at a later point. You need to implement the equivalent Python functionality these Model only tools provide.<\/li>\n<li>If your model used inline variable substitution such as\u00a0%workspace%, %scratchworkspace%, %n%, %i%,\u00a0or\u00a0%variable name%, you will have to replace these with the correct value in the Python script.<\/li>\n<li>If your model used layers or table views from ArcMap or ArcGlobe, those layers or table views will have to be created or the data will need to be fully referenced in the script.<\/li>\n<li>If your model used layers or table views that are not created within the original model, those layers or table views will have to be created in the script using tools such as\u00a0<a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/Make_Feature_Layer\/00170000006p000000\/\" target=\"_blank\" rel=\"noopener\">MakeFeatureLayer<\/a>\u00a0and\u00a0<a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/Make_Table_View\/00170000006v000000\/\" target=\"_blank\" rel=\"noopener\">MakeTableView<\/a>.<\/li>\n<li>If your model included sub-models, the contents within those sub-models will not be exported. Instead, the toolbox will have to be referenced and the model tool will need to be called inside the script.<\/li>\n<li>\n<div>If you expect to be overwriting data, set the\u00a0overwriteOutput\u00a0property to True.<\/div>\n<p><b>arcpy.env.overwriteOutput =\u00a0True<\/b><\/li>\n<li>Variables in your model are converted directly into Python variables in the exported script. You need to avoid naming your model variables the same as Python\u2019s reserved keywords (for example, class, global, return). For a full list of reserved keywords, use Python\u2019s keyword module, illustrated below.<br \/>\n<img decoding=\"async\" src=\"http:\/\/edn1.esri.com\/blogimages\/gp\/062411_1817_ExportModel6.png\" alt=\"\" \/><\/li>\n<li>If your model has an input variable type that is a\u00a0<a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/A_quick_tour_of_using_Feature_Set_and_Record_Set\/002w00000023000000\/\" target=\"_blank\" rel=\"noopener\">FeatureSet or RecordSet<\/a>, it will be exported as an in-memory feature class such as\u00a0<i>\u201cin_memory\\{E83BC42B-3578-4D20-A817-5F2AF3F5D05E}\u201d<\/i>. You need to update this variable in Python with a path to a valid dataset or create a script tool where the input data type is a feature set.<\/li>\n<\/ol>\n<h2>Call the model from inside the script<\/h2>\n<p>If you want to use a model in Python, you can easily access the model tool inside the script rather than exporting it or re-writing the same logic. For example, custom tools created in ModelBuilder and stored in a custom toolbox can be accessed in a Python script like any system tool by importing the custom toolbox.<\/p>\n<p><b>import\u00a0arcpy\u00a0<\/b><br \/>\n<b>arcpy.ImportToolbox(\u201cc:\/mytools\/geometrytools.tbx\u201d,\u00a0\u201cmytools\u201d)\u00a0<\/b><br \/>\n<b>arcpy.CreateRegularPolygons_mytools(parameter1, parameter2)<\/b><\/p>\n<h2>Useful Links<\/h2>\n<p><a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/What_is_Python\/002z00000001000000\/\" target=\"_blank\" rel=\"noopener\">Learning Python<\/a><br \/>\n<a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/Exporting_a_model\/002w00000031000000\/\" target=\"_blank\" rel=\"noopener\">Exporting a Model<\/a><br \/>\n<a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/Using_tools_in_Python\/002z0000000n000000\/\">Using tools in Python<\/a><br \/>\n<a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/Adding_toolboxes_in_Python\/002z00000009000000\/\" target=\"_blank\" rel=\"noopener\">Adding toolboxes in Python<\/a><br \/>\n<a href=\"http:\/\/help.arcgis.com\/en\/arcgisdesktop\/10.0\/help\/index.html#\/Listing_data\/002z00000011000000\/\" target=\"_blank\" rel=\"noopener\">Listing data<\/a><br \/>\n<a href=\"http:\/\/training.esri.com\/acb2000\/showdetl.cfm?DID=6&amp;Product_ID=971\" target=\"_blank\" rel=\"noopener\">Using Python in ArcGIS Desktop 10 \u2013 Web Course<\/a><\/p>\n<p>&nbsp;<\/p>\n"}],"authors":[{"ID":3991,"user_firstname":"Dale","user_lastname":"Honeycutt","nickname":"dmhoneycutt","user_nicename":"dmhoneycutt","display_name":"Dale Honeycutt","user_email":"dhoneycutt@esri.com","user_url":"","user_registered":"2018-03-02 00:15:37","user_description":"","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"},{"ID":5121,"user_firstname":"","user_lastname":"","nickname":"jpardy84","user_nicename":"jpardy84","display_name":"jpardy","user_email":"jpardy@esri.com","user_url":"","user_registered":"2018-03-02 00:16:49","user_description":"","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/ef5394b9654988f205fc1c43beebaef1eea90faf08e750f1b4d89434fc733f9b?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/ef5394b9654988f205fc1c43beebaef1eea90faf08e750f1b4d89434fc733f9b?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"}],"related_articles":"","card_image":false,"wide_image":false},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Considerations when exporting a model to a Python script<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Considerations when exporting a model to a Python script\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-18T19:32:46+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script\"},\"author\":{\"name\":\"Dale Honeycutt\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/ecf725596ec627cacb0bf10409502088\"},\"headline\":\"Considerations when exporting a model to a Python script\",\"datePublished\":\"2011-06-24T18:40:46+00:00\",\"dateModified\":\"2018-12-18T19:32:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script\"},\"wordCount\":9,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"geoprocessing\",\"ModelBuilder\",\"python\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script\",\"name\":\"Considerations when exporting a model to a Python script\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2011-06-24T18:40:46+00:00\",\"dateModified\":\"2018-12-18T19:32:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Considerations when exporting a model to a Python script\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/ecf725596ec627cacb0bf10409502088\",\"name\":\"Dale Honeycutt\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=96&d=blank&r=g\",\"caption\":\"Dale Honeycutt\"},\"url\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Considerations when exporting a model to a Python script","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script","og_locale":"en_US","og_type":"article","og_title":"Considerations when exporting a model to a Python script","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2018-12-18T19:32:46+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script"},"author":{"name":"Dale Honeycutt","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/ecf725596ec627cacb0bf10409502088"},"headline":"Considerations when exporting a model to a Python script","datePublished":"2011-06-24T18:40:46+00:00","dateModified":"2018-12-18T19:32:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script"},"wordCount":9,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["geoprocessing","ModelBuilder","python"],"articleSection":["Analytics"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script","name":"Considerations when exporting a model to a Python script","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2011-06-24T18:40:46+00:00","dateModified":"2018-12-18T19:32:46+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Considerations when exporting a model to a Python script"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/ecf725596ec627cacb0bf10409502088","name":"Dale Honeycutt","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=96&d=blank&r=g","caption":"Dale Honeycutt"},"url":""}]}},"text_date":"June 24, 2011","author_name":"Multiple Authors","author_page":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/considerations-when-exporting-a-model-to-a-python-script","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/08\/Newsroom-Keyart-Wide-1920-x-1080.jpg","primary_product":"ArcMap","tag_data":[{"term_id":24321,"name":"geoprocessing","slug":"geoprocessing","term_group":0,"term_taxonomy_id":24321,"taxonomy":"post_tag","description":"","parent":0,"count":131,"filter":"raw"},{"term_id":24331,"name":"ModelBuilder","slug":"modelbuilder","term_group":0,"term_taxonomy_id":24331,"taxonomy":"post_tag","description":"","parent":0,"count":28,"filter":"raw"},{"term_id":24341,"name":"python","slug":"python","term_group":0,"term_taxonomy_id":24341,"taxonomy":"post_tag","description":"","parent":0,"count":171,"filter":"raw"}],"category_data":[{"term_id":23341,"name":"Analytics","slug":"analytics","term_group":0,"term_taxonomy_id":23341,"taxonomy":"category","description":"","parent":0,"count":1333,"filter":"raw"}],"product_data":[{"term_id":36991,"name":"ArcMap","slug":"arcgis-desktop","term_group":0,"term_taxonomy_id":36991,"taxonomy":"product","description":"","parent":36981,"count":325,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=arcgis-desktop","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/175571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/3991"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=175571"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/175571\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=175571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=175571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=175571"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=175571"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=175571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}