<?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: PointGeometry to FeatureLayer work in python window, not in Tool (python) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394254#M31186</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan. &lt;/P&gt;&lt;P&gt;What I was bringing in as the in_feature was the PointGeometry, and the need was to create a feature layer.&amp;nbsp; I hadn't thought about trying &lt;STRONG&gt;CopyFeature_management &lt;/STRONG&gt; from the PointGeometry to a tmp file.&amp;nbsp; But that worked. yea!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# ...a lot of pre-processing
# create ptGeom from field value in table, from search cursor
ptGeom = arcpy.PointGeometry(arcpy.Point(ptX, ptY, 0, 0, ptid))
# copy the ptGeom to a temp file
arcpy.CopyFeatures_management(ptGeom, "tmpPtGeom")
# use the temp file to make the FL for the process to continue.
arcpy.MakeFeatureLayer_management("tmpPtGeom", "origPtFL")
# ......lots more processing&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is still interesting that the MakeFeatureLayer_management would also accept the PointGeometry as input when in in the python window (in ArcMap) but not as a tool (also run in ArcMap);&amp;nbsp; One of those little inconsistencies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, Geonet solved my issues before even getting an incident assigned in support (not hassling support, I actually typically get good service).&amp;nbsp; What takes the longs here is trying to write it up in a way that doesn't bog the question down....quick screen shared provides much more info than can ever be typed here.&amp;nbsp; I will still follow thru with them however, to figure out if the python-window vs tool is a bug or an inconsistency that can be corrected.&amp;nbsp; At least now I can point them to this thread!&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 18:03:48 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2021-12-11T18:03:48Z</dc:date>
    <item>
      <title>PointGeometry to FeatureLayer work in python window, not in Tool (python)</title>
      <link>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394252#M31184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Similar issue to&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/171620" target="_blank"&gt;MakeFeatureLayer_management does not add layer to TOC?&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (which I even had answer to) and&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/thread/111207#comment-416673" title="https://community.esri.com/message/416673#comment-416673" target="_blank"&gt;https://community.esri.com/message/416673#comment-416673&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried many incarnations of the Make Feature Layer options from those two threads.&amp;nbsp; My tool works fine if I copy/past in the ArcMap python window, but when I run from the tool, my final result is an empty table (but with all the fields I added). No Error.&amp;nbsp;&amp;nbsp;&amp;nbsp; I also successfully use the MakeFeatureLayer command in this same tools, but those are coming from feature classes, not PointGeometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I traced it backwards, with many print statements,&amp;nbsp; the difference seems to be that my FeatureLayer created from my PointGeometry is empty when running from the tool...but a count of one (as it should be) when running in the python window. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#&amp;nbsp; all the necessary variables are valid
ptGeom = arcpy.PointGeometry(arcpy.Point(ptX, ptY, 0, 0, ptid))
arcpy.MakeFeatureLayer_management(ptGeom, "origPtFL")&amp;nbsp; 
resultCountPT = int(arcpy.GetCount_management("origPtFL").getOutput(0))
print("\n {}: {} recs".format("origPtFL", resultCountPT))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a snippet from a longer tool that wouldn't be practical to include, but all the variables, etcs are assigned. but since the count for "origPtFL" is now zerow, when I get down to&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.SelectLayerByLocation_management(tmpContourFL, nearType, "origPtFL", nearDist)"&amp;nbsp; &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the results perpetual zero records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW - the ptX, ptY values are coming thru fields in a table in a searchcursor.&amp;nbsp;&amp;nbsp; I know this isn't enough to be able to recreate the process, and I don't expect anyone to create a tool just to test this, but hoping someone else has a workable solution to this.&amp;nbsp; BTW - I have put in a support ticket, but haven't heard anything from them yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:03:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394252#M31184</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-11T18:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: PointGeometry to FeatureLayer work in python window, not in Tool (python)</title>
      <link>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394253#M31185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-classes/pointgeometry.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-classes/pointgeometry.htm"&gt;PointGeometry—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;to &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/copy-features.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/copy-features.htm"&gt;Copy Features—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;because &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/make-feature-layer.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/make-feature-layer.htm"&gt;Make Feature Layer—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;requires a featureclass or feature layer... and I don't think you have one&lt;/P&gt;&lt;P&gt;but I haven't worked with those in some time.&amp;nbsp; I can give you a solution using numpy if you just want to convert a list of points to a featureclass, but have a look at that process manually first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 22:58:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394253#M31185</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-05T22:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: PointGeometry to FeatureLayer work in python window, not in Tool (python)</title>
      <link>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394254#M31186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan. &lt;/P&gt;&lt;P&gt;What I was bringing in as the in_feature was the PointGeometry, and the need was to create a feature layer.&amp;nbsp; I hadn't thought about trying &lt;STRONG&gt;CopyFeature_management &lt;/STRONG&gt; from the PointGeometry to a tmp file.&amp;nbsp; But that worked. yea!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# ...a lot of pre-processing
# create ptGeom from field value in table, from search cursor
ptGeom = arcpy.PointGeometry(arcpy.Point(ptX, ptY, 0, 0, ptid))
# copy the ptGeom to a temp file
arcpy.CopyFeatures_management(ptGeom, "tmpPtGeom")
# use the temp file to make the FL for the process to continue.
arcpy.MakeFeatureLayer_management("tmpPtGeom", "origPtFL")
# ......lots more processing&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is still interesting that the MakeFeatureLayer_management would also accept the PointGeometry as input when in in the python window (in ArcMap) but not as a tool (also run in ArcMap);&amp;nbsp; One of those little inconsistencies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, Geonet solved my issues before even getting an incident assigned in support (not hassling support, I actually typically get good service).&amp;nbsp; What takes the longs here is trying to write it up in a way that doesn't bog the question down....quick screen shared provides much more info than can ever be typed here.&amp;nbsp; I will still follow thru with them however, to figure out if the python-window vs tool is a bug or an inconsistency that can be corrected.&amp;nbsp; At least now I can point them to this thread!&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:03:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394254#M31186</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-11T18:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: PointGeometry to FeatureLayer work in python window, not in Tool (python)</title>
      <link>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394255#M31187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Total side note...&lt;/P&gt;&lt;P&gt;One thing that I have used in teaching is video... I use a video production program called Camtasia which allows you to record both audio and video on screen (simple explanation).&amp;nbsp; A cheap alternative is Snagit from the same family, which you can grab the video at least (no audio).&amp;nbsp; The program is cheap (Camtasia more expensive) and Snagit is the goto screen grab program if you also want to get quick screen grabs with annotation etc.&amp;nbsp;&amp;nbsp; www.techsmith.com&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 00:51:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394255#M31187</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-06T00:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: PointGeometry to FeatureLayer work in python window, not in Tool (python)</title>
      <link>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394256#M31188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use to have&amp;nbsp; SnagIt and used it quite a bit for training others too,, providing live audio but canned video.&amp;nbsp; I haven't keep up maintenance so it is long gone.&amp;nbsp; I use Jing on occasion for quick 5-min videos, if needed.&amp;nbsp; Also a techsmith product.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 01:00:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pointgeometry-to-featurelayer-work-in-python/m-p/394256#M31188</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-04-06T01:00:39Z</dc:date>
    </item>
  </channel>
</rss>

