<?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 Feature Class to shapefile Arcpy &amp; Arcgis JS in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-class-to-shapefile-arcpy-arcgis-js/m-p/687521#M63978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code in arcpy is used to convert a dwg file into shapefile and it works perfectly when you run it within arcmap:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; import sys, zipfile, arcpy, os, traceback&lt;BR /&gt;&amp;nbsp; &amp;nbsp; from arcpy import env&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; # Set environment settings&lt;BR /&gt;&amp;nbsp; &amp;nbsp; env.workspace = "C:/GISApplication/GIS/Layer_Updated_Drawings"&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; # Set local variables&lt;BR /&gt;&amp;nbsp; &amp;nbsp; fileName = arcpy.GetParameterAsText(0)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; featureType = arcpy.GetParameterAsText(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; file = os.path.join(fileName, featureType)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; inFeatures = [file]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; outLocation = "C:/GISApplication/GIS/Layer_Updated_Drawings/Converted"&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; # Execute FeatureClassToGeodatabase&lt;BR /&gt;&amp;nbsp; &amp;nbsp; arcpy.FeatureClassToShapefile_conversion(inFeatures, outLocation)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I try to run this script using the following javascript code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; url = ARCGIS_SERVER + 'Toolbox/DwgToZippedShapefile/GPServer/LayerUpdate';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; convParams = {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; FileName: "MIPBoundary.dwg", &amp;nbsp;//Hardcoded for testing&lt;BR /&gt;&amp;nbsp; &amp;nbsp; FeatureType: "Polyline" //Hardcoded for testing&lt;BR /&gt;&amp;nbsp; &amp;nbsp; };&lt;BR /&gt;&amp;nbsp; &amp;nbsp; convExportToolName = "SHPFileResults";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; convJobFolder = "DwgToZippedShapefile_GPServer";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; var gpConversionProcess = new Geoprocessor(url);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; gpConversionProcess.submitJob(convParams, gpConversionComplete, gpConversionStatus, gpConversionFailed);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it keeps failing and I keep getting the following error on arcgis server manager:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #505051; background-color: #e5edf4; font-size: 12px;"&gt;Error executing tool. LayerUpdate Job ID: j7af4b50ca616491eb13dce08dfe17b7f : Traceback (most recent call last): File "(PATH)\Toolbox\DwgToZippedShapefile.GPServer\extracted\v101\my_toolboxes\UpdateLayer.py", line 25, in &lt;/SPAN&gt;arcpy.FeatureClassToShapefile_conversion(inFeatures, outLocation) File "(PATH)arcgis\server\arcpy\arcpy\conversion.py", line 2775, in FeatureClassToShapefile raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Features: Dataset Boundary.dwg\Polyline does not exist or is not supported Failed to execute (FeatureClassToShapefile). Failed to execute (LayerUpdate). Failed to execute (LayerUpdate).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I don't know why it isn't working as I am passing all the parameters and when running the tool in arcmap with the exact same parameters it works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 May 2017 08:41:57 GMT</pubDate>
    <dc:creator>NalydLeetlub</dc:creator>
    <dc:date>2017-05-10T08:41:57Z</dc:date>
    <item>
      <title>Feature Class to shapefile Arcpy &amp; Arcgis JS</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-class-to-shapefile-arcpy-arcgis-js/m-p/687521#M63978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code in arcpy is used to convert a dwg file into shapefile and it works perfectly when you run it within arcmap:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; import sys, zipfile, arcpy, os, traceback&lt;BR /&gt;&amp;nbsp; &amp;nbsp; from arcpy import env&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; # Set environment settings&lt;BR /&gt;&amp;nbsp; &amp;nbsp; env.workspace = "C:/GISApplication/GIS/Layer_Updated_Drawings"&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; # Set local variables&lt;BR /&gt;&amp;nbsp; &amp;nbsp; fileName = arcpy.GetParameterAsText(0)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; featureType = arcpy.GetParameterAsText(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; file = os.path.join(fileName, featureType)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; inFeatures = [file]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; outLocation = "C:/GISApplication/GIS/Layer_Updated_Drawings/Converted"&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; # Execute FeatureClassToGeodatabase&lt;BR /&gt;&amp;nbsp; &amp;nbsp; arcpy.FeatureClassToShapefile_conversion(inFeatures, outLocation)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I try to run this script using the following javascript code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; url = ARCGIS_SERVER + 'Toolbox/DwgToZippedShapefile/GPServer/LayerUpdate';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; convParams = {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; FileName: "MIPBoundary.dwg", &amp;nbsp;//Hardcoded for testing&lt;BR /&gt;&amp;nbsp; &amp;nbsp; FeatureType: "Polyline" //Hardcoded for testing&lt;BR /&gt;&amp;nbsp; &amp;nbsp; };&lt;BR /&gt;&amp;nbsp; &amp;nbsp; convExportToolName = "SHPFileResults";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; convJobFolder = "DwgToZippedShapefile_GPServer";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; var gpConversionProcess = new Geoprocessor(url);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; gpConversionProcess.submitJob(convParams, gpConversionComplete, gpConversionStatus, gpConversionFailed);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it keeps failing and I keep getting the following error on arcgis server manager:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #505051; background-color: #e5edf4; font-size: 12px;"&gt;Error executing tool. LayerUpdate Job ID: j7af4b50ca616491eb13dce08dfe17b7f : Traceback (most recent call last): File "(PATH)\Toolbox\DwgToZippedShapefile.GPServer\extracted\v101\my_toolboxes\UpdateLayer.py", line 25, in &lt;/SPAN&gt;arcpy.FeatureClassToShapefile_conversion(inFeatures, outLocation) File "(PATH)arcgis\server\arcpy\arcpy\conversion.py", line 2775, in FeatureClassToShapefile raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Features: Dataset Boundary.dwg\Polyline does not exist or is not supported Failed to execute (FeatureClassToShapefile). Failed to execute (LayerUpdate). Failed to execute (LayerUpdate).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I don't know why it isn't working as I am passing all the parameters and when running the tool in arcmap with the exact same parameters it works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 08:41:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-class-to-shapefile-arcpy-arcgis-js/m-p/687521#M63978</guid>
      <dc:creator>NalydLeetlub</dc:creator>
      <dc:date>2017-05-10T08:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class to shapefile Arcpy &amp; Arcgis JS</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-class-to-shapefile-arcpy-arcgis-js/m-p/687522#M63979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Given the error message, I am leaning towards permissions not being correct on the workspace.&amp;nbsp; The code might run fine in ArcMap, but the user and permissions while running in ArcMap are completely different than the user and permissions while running it as a geoprocessing job on the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check permissions, build a simple script that reads and writes a text file to the same locations.&amp;nbsp; If the simple script fails, then you know it is a permissions issue and not an issue with any of geoprocessing tools you are trying to run.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 15:27:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-class-to-shapefile-arcpy-arcgis-js/m-p/687522#M63979</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-05-10T15:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class to shapefile Arcpy &amp; Arcgis JS</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-class-to-shapefile-arcpy-arcgis-js/m-p/687523#M63980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cross-posted to GIS StackExchange as &lt;A href="https://gis.stackexchange.com/questions/239862/converting-dwg-to-shapefile-using-arcpy-and-arcgis-js"&gt;Converting dwg to shapefile using arcpy and ArcGIS js&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2017 17:03:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-class-to-shapefile-arcpy-arcgis-js/m-p/687523#M63980</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2017-05-10T17:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class to shapefile Arcpy &amp; Arcgis JS</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-class-to-shapefile-arcpy-arcgis-js/m-p/687524#M63981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-family: 'Helvetica Neue'; font-size: 10.5pt;"&gt;&lt;SPAN style="color: #3d3d3d; background: white;"&gt;Hi Nalyd - Thanks for asking your questions! Since your question is related to arcpy and JS and similar to another past questions, I wanted to let you know that we're moving your question from the GeoNet Help group to the &lt;A href="https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript?sr=search&amp;amp;searchId=7ab85b98-c806-4aab-904a-8057a3876a6d&amp;amp;searchIndex=0"&gt;https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript?sr=search&amp;amp;searchId=7ab85b98-c806-4aab-904a-8057a3876a6d&amp;amp;searchIndex=0&lt;/A&gt;‌&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; background: white;"&gt;&amp;nbsp;space so our Esri and user subject matter experts can further help answer this and future questions. &amp;nbsp;So you're aware on how and where to post future questions, here's a few quick tips and reminders:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: 'Helvetica Neue'; font-size: 10.5pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0; margin-bottom: 0; vertical-align: middle; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue'; font-size: 10.5pt; font-weight: normal; font-style: normal; background: white;"&gt;First, use the GeoNet search (top right corner by your profile icon) to search and see if your question has already by asked/answered previously.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="margin-top: 0; margin-bottom: 0; vertical-align: middle; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue'; font-size: 11.0pt; font-weight: normal; font-style: normal; color: black;"&gt;If not, than we suggest reviewing the&amp;nbsp;&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/docs/DOC-1544-geonet-community-structure"&gt;&lt;SPAN style="font-family: 'Helvetica Neue'; font-size: 11.25pt; background: white;"&gt;GeoNet Community Structure&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-family: 'Helvetica Neue'; font-size: 11.0pt; font-weight: normal; font-style: normal; color: black;"&gt;, to find the most relevant space to post your question.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="margin-top: 0; margin-bottom: 0; vertical-align: middle; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue'; font-size: 10.5pt; font-weight: normal; font-style: normal; color: #3d3d3d; background: white;"&gt;The GeoNet&amp;nbsp;&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/community/help-and-feedback?sr=search&amp;amp;searchId=61184e1f-ac27-4180-b62a-99a9c2c1fc87&amp;amp;searchIndex=0"&gt;&lt;SPAN style="font-family: 'Helvetica Neue'; font-size: 10.5pt; background: white;"&gt;GeoNet Help&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="font-family: 'Helvetica Neue'; font-size: 10.5pt; font-weight: normal; font-style: normal; color: #3d3d3d; background: white;"&gt;&amp;nbsp;group is for questions and tips on how to use the GeoNet community platform not the Esri ArcGIS platform. Following steps 1 &amp;amp; 2 above will give you the best results for getting Esri product questions answered.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="margin-top: 0; margin-bottom: 0; vertical-align: middle; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue'; font-size: 10.5pt; color: #3d3d3d; background: white;"&gt;This GeoNet 101 "How to Ask Questions on GeoNet" post is also a helpful guide to asking questions:&amp;nbsp;&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/community/help-and-feedback/blog/2016/08/15/community-news-and-tips-how-to-ask-questions-and-get-answers"&gt;&lt;SPAN style="font-family: 'Helvetica Neue'; font-size: 11.0pt;"&gt;https://community.esri.com/community/help-and-feedback/blog/2016/08/15/community-news-and-tips-how-to-ask-questions-and-get-answers&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="margin: 0in; font-family: 'Helvetica Neue'; font-size: 10.5pt; color: #3d3d3d;"&gt;&lt;SPAN style="background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: 'Helvetica Neue'; font-size: 10.5pt; color: #3d3d3d;"&gt;&lt;SPAN style="background: white;"&gt;Thanks again for contributing and I hope this helps and let us know if you have any questions.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 00:15:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-class-to-shapefile-arcpy-arcgis-js/m-p/687524#M63981</guid>
      <dc:creator>ChrisCatania</dc:creator>
      <dc:date>2017-05-12T00:15:05Z</dc:date>
    </item>
  </channel>
</rss>

