<?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: How to save a layer created from raster without using map document or ArcGISPro? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-save-a-layer-created-from-raster-without/m-p/1089349#M62090</link>
    <description>&lt;P&gt;you have to use the full path to the layer on disk.&amp;nbsp; That is&amp;nbsp;&lt;/P&gt;&lt;P&gt;"c:/temp/temperature.lyr"&amp;nbsp; &amp;nbsp;for arcmap&lt;/P&gt;&lt;P&gt;"c:/temp/temperature.lyrx"&amp;nbsp; &amp;nbsp;for arcgis pro&lt;/P&gt;</description>
    <pubDate>Mon, 16 Aug 2021 17:25:56 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-08-16T17:25:56Z</dc:date>
    <item>
      <title>How to save a layer created from raster without using map document or ArcGISPro?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-save-a-layer-created-from-raster-without/m-p/1089234#M62089</link>
      <description>&lt;P&gt;I have created a multidimensional raster layer using the "MakeMultidimensionalRasterLayer" tool&amp;nbsp; from arcgispro using the tool's python scripting and without using ArcGISPro and a map document. I created the layer as following:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;p = arcpy.md.MakeMultidimensionalRasterLayer(in_multidimensional_raster=netCDF_in, out_multidimensional_raster_layer=temperature,variables=["tmin"])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i want to save this layer so that i can define a certain symbology to this layer file using the colorizer attribute within the file. I tried saving it using the following code but when i open the saved file in ArcGISPro, it crashes and the crash only happens because of the file otherwise its ok.&lt;/P&gt;&lt;P&gt;How can i achieve this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;lyr="temperature.lyr"

k=arcpy.SaveToLayerFile_management(p,lyr)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 11:36:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-save-a-layer-created-from-raster-without/m-p/1089234#M62089</guid>
      <dc:creator>RehanChaudhary</dc:creator>
      <dc:date>2021-08-16T11:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a layer created from raster without using map document or ArcGISPro?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-save-a-layer-created-from-raster-without/m-p/1089349#M62090</link>
      <description>&lt;P&gt;you have to use the full path to the layer on disk.&amp;nbsp; That is&amp;nbsp;&lt;/P&gt;&lt;P&gt;"c:/temp/temperature.lyr"&amp;nbsp; &amp;nbsp;for arcmap&lt;/P&gt;&lt;P&gt;"c:/temp/temperature.lyrx"&amp;nbsp; &amp;nbsp;for arcgis pro&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 17:25:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-save-a-layer-created-from-raster-without/m-p/1089349#M62090</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-08-16T17:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to save a layer created from raster without using map document or ArcGISPro?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-save-a-layer-created-from-raster-without/m-p/1089625#M62095</link>
      <description>&lt;P&gt;Geoprocessing tools return &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/result.htm" target="_self"&gt;result objects&lt;/A&gt;&amp;nbsp;so what you are assigning to "p" is a results object not a raster. You need to obtain the actual output using getOutput() on the result object. Review the code samples in the help file .&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 15:33:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-save-a-layer-created-from-raster-without/m-p/1089625#M62095</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2021-08-17T15:33:06Z</dc:date>
    </item>
  </channel>
</rss>

