<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calculate and use extent of feature class in model builder for geoprocessing task in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1264981#M162</link>
    <description>&lt;P&gt;Your cursor is capturing the shape of the first point. I believe that if you want the extent of the union of both points, you want to get the extent from arcpy.Describe() on the feature set.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2023 16:46:45 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2023-03-07T16:46:45Z</dc:date>
    <item>
      <title>Calculate and use extent of feature class in model builder for geoprocessing task</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/817648#M155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have a series of models.&amp;nbsp; One of the models creates/overwrites a feature class based on a user selection of features.&amp;nbsp; A second tool is trying to run an 'Union' tool using the extents of the feature class mentioned.&amp;nbsp; Initially I had extents of feature class as an environment input into Union in my model, however, I found that I have to revalidate the model every time before I run, otherwise it just uses the same extents coordinates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the 'Calculate Value' saving value as 'Extent' object to recalculate the extent and use that everytime, but it doesnt work.&amp;nbsp; It runs without errors but does not appear to use the extents Im trying to pass through.&amp;nbsp; Ive tried several syntax options but none work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how to do this?&amp;nbsp; Below is very simple model&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/496545_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/496546_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2020 18:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/817648#M155</guid>
      <dc:creator>NealBanerjee</dc:creator>
      <dc:date>2020-06-15T18:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and use extent of feature class in model builder for geoprocessing task</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/817649#M156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Those extent objects can be a bit tricky, I might amend it to something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#create a copy of extent object to modify&lt;/P&gt;&lt;P&gt;new_extent =&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;objDes.extent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#set values for extent object&lt;/P&gt;&lt;P&gt;new_extent.XMin = objDes.extent.XMin&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;new_extent.XMax = objDes.extent.XMax&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;new_extent.YMin = objDes.extent.YMin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;new_extent.YMax = objDes.extent.YMax&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;return new_extent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;No idea if that will work as I struggle with these also.&amp;nbsp; You may just want to run the 'Feature envelope to polygon' tool on the data then use that polygon as the extent if not.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2020 19:15:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/817649#M156</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-06-15T19:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and use extent of feature class in model builder for geoprocessing task</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/817650#M157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David - thanks for the suggestion, but unfortunately trying to set the values didnt seem to work either. Ill look into the envelope option - that sounds promising.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2020 19:41:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/817650#M157</guid>
      <dc:creator>NealBanerjee</dc:creator>
      <dc:date>2020-06-15T19:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and use extent of feature class in model builder for geoprocessing task</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1087260#M158</link>
      <description>&lt;P&gt;(I realize this is a somewhat old question, but having just run into the issue today, I wanted to make sure there's a googleable answer for the next time it stymies me!)&lt;/P&gt;&lt;P&gt;This is a weird one, and the esri documentation is uncharacteristically unhelpful. Here's what I found that worked...&lt;/P&gt;&lt;P&gt;Basically, the function needs to return a string, not an extent object; the output type is being set to enable you to chain items in ModelBuilder but isn't actually relevant to the value you return! What worked for me was to return a string in the format "xmin ymin xmax ymax" and set the output type to Extent. Arcpy/ModelBuilder are smart enough to know from the output type that you should be able to use the output of your function as input to an Extent parameter of another tool, and are also smart enough to handle the coercion from the string formatting of the extent to the expected Extent object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="calcExtentValue.png" style="width: 976px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/20487i9A50D312129D9CB1/image-size/large?v=v2&amp;amp;px=999" role="button" title="calcExtentValue.png" alt="calcExtentValue.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 20:32:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1087260#M158</guid>
      <dc:creator>JeffreyBurka</dc:creator>
      <dc:date>2021-08-09T20:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and use extent of feature class in model builder for geoprocessing task</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1092541#M159</link>
      <description>&lt;P&gt;This worked great! Thank you for posting Jeffrey.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 01:23:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1092541#M159</guid>
      <dc:creator>JohnGargiulo</dc:creator>
      <dc:date>2021-08-26T01:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and use extent of feature class in model builder for geoprocessing task</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1264112#M160</link>
      <description>&lt;P&gt;Thanks for this workaround! Create Fishnet and Grid Index Features both have this same problem in ModelBuilder. It would be nice if the input extent text auto-populated when running the model like it does when you run the standalone tool. It seems silly to need a multiple-line Python script just to pass on the extent of a feature class to a tool, but I haven't found a better way.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 18:47:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1264112#M160</guid>
      <dc:creator>bdewitt_olsson</dc:creator>
      <dc:date>2023-03-03T18:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and use extent of feature class in model builder for geoprocessing task</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1264451#M161</link>
      <description>&lt;P&gt;I am trying to get the extension using this post.&lt;BR /&gt;From a Feature Set that the user will populate (add a colon) and use as an extension to get a slope smaller in size.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlbertoCaivano2_0-1678108766257.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64399i9FC1A671D0AC5CAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlbertoCaivano2_0-1678108766257.png" alt="AlbertoCaivano2_0-1678108766257.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlbertoCaivano2_1-1678108801068.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64400iA90B3DAAF0268280/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlbertoCaivano2_1-1678108801068.png" alt="AlbertoCaivano2_1-1678108801068.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The problem is that I only get the extension of the first point when I use the Feature set (append). And not the extension of the two generated points; so the cut extension of the slope raster is smaller than the one I am interested in.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlbertoCaivano2_2-1678108855611.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64401i302FAC1B93560CE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlbertoCaivano2_2-1678108855611.png" alt="AlbertoCaivano2_2-1678108855611.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can you find the reason why? Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 13:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1264451#M161</guid>
      <dc:creator>AlbertoCañivano2</dc:creator>
      <dc:date>2023-03-06T13:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate and use extent of feature class in model builder for geoprocessing task</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1264981#M162</link>
      <description>&lt;P&gt;Your cursor is capturing the shape of the first point. I believe that if you want the extent of the union of both points, you want to get the extent from arcpy.Describe() on the feature set.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 16:46:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/calculate-and-use-extent-of-feature-class-in-model/m-p/1264981#M162</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2023-03-07T16:46:45Z</dc:date>
    </item>
  </channel>
</rss>

