<?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 How to execute Python script in modell builder in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-execute-python-script-in-modell-builder/m-p/518507#M40609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create and trace a geometric network in model builder with python but it does not work.&lt;/P&gt;&lt;P&gt;I get the following error for the "Create geometric Network" tool when I execute the script in model builder:&amp;nbsp; &lt;/P&gt;&lt;P&gt;SyntaxError: invalid syntax (create_network.py, line 16) Failed to execute (CreateGeometricNetwork ). &lt;/P&gt;&lt;P&gt;Are the settings and the code right? The first four entries are definded as required inputs, the last one ("Network_Net") is defined as a derived output. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jun 2015 11:01:41 GMT</pubDate>
    <dc:creator>MarlenaGötza</dc:creator>
    <dc:date>2015-06-16T11:01:41Z</dc:date>
    <item>
      <title>How to execute Python script in modell builder</title>
      <link>https://community.esri.com/t5/python-questions/how-to-execute-python-script-in-modell-builder/m-p/518507#M40609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create and trace a geometric network in model builder with python but it does not work.&lt;/P&gt;&lt;P&gt;I get the following error for the "Create geometric Network" tool when I execute the script in model builder:&amp;nbsp; &lt;/P&gt;&lt;P&gt;SyntaxError: invalid syntax (create_network.py, line 16) Failed to execute (CreateGeometricNetwork ). &lt;/P&gt;&lt;P&gt;Are the settings and the code right? The first four entries are definded as required inputs, the last one ("Network_Net") is defined as a derived output. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 11:01:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-execute-python-script-in-modell-builder/m-p/518507#M40609</guid>
      <dc:creator>MarlenaGötza</dc:creator>
      <dc:date>2015-06-16T11:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Python script in modell builder</title>
      <link>https://community.esri.com/t5/python-questions/how-to-execute-python-script-in-modell-builder/m-p/518508#M40610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marlena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like the issue is when you try and create the geometric network:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen1.PNG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/110389_screen1.PNG" style="width: 620px; height: 21px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't look like you have the variable 'networkdataset' defined.&amp;nbsp; I believe this should be 'FeatureDataset'.&amp;nbsp; Also, there should be a comma after the first variable (i.e. FeatureDataset, "network_Net", .....).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 11:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-execute-python-script-in-modell-builder/m-p/518508#M40610</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-06-16T11:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Python script in modell builder</title>
      <link>https://community.esri.com/t5/python-questions/how-to-execute-python-script-in-modell-builder/m-p/518509#M40611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed the code so that the Sccript only creates the geometric network, know it always crashes ArcMapw when I start the execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FeatureDataset = arcpy.GetParameterAsText(0)&lt;/P&gt;&lt;P&gt;FeatureClass1 = arcpy.GetParameterAsText(1)&lt;/P&gt;&lt;P&gt;FeatureClass2 = arcpy.GetParameterAsText(2)&lt;/P&gt;&lt;P&gt;FeatureClass3 = arcpy.GetParameterAsText(3)&lt;/P&gt;&lt;P&gt;OutputGroupLayer = arcpy.GetParameterAsText(4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FeatureClasses = "'" + FeatureClass1 + " COMPLEX_EDGE NO;" + FeatureClass2 + " SIMPLE_JUNCTION YES;" + FeatureClass3 + "SIMPLE_JUNCTION YES" + "'"&lt;/P&gt;&lt;P&gt;print FeatureDataset&lt;/P&gt;&lt;P&gt;Weights = "'" + FeatureClass1 + "SR_L_m Kosten" + "'"&lt;/P&gt;&lt;P&gt;arcpy.AddMessage(FeatureClasses)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CreateGeometricNetwork_management(FeatureDataset, "network_Net", FeatureClasses, "", "Kosten DOUBLE #", Weights, "", "PRESERVE_ENABLED")&lt;/P&gt;&lt;P&gt;except:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(arcpy.GetMessages())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 12:00:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-execute-python-script-in-modell-builder/m-p/518509#M40611</guid>
      <dc:creator>MarlenaGötza</dc:creator>
      <dc:date>2015-06-16T12:00:59Z</dc:date>
    </item>
  </channel>
</rss>

