<?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: MakeRouteEventLayer, any ideas on why variable for in event properties no work? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/makerouteeventlayer-any-ideas-on-why-variable-for/m-p/715067#M55499</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In python the seperator between your properties is the | symbol, not a space. Your properties would be "routeID|Line|&lt;SPAN style="color: #000000;"&gt;inBMP|inEMP".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;If you called the same model from C# you would use spaces.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Mar 2017 23:19:22 GMT</pubDate>
    <dc:creator>RichardDaniels</dc:creator>
    <dc:date>2017-03-07T23:19:22Z</dc:date>
    <item>
      <title>MakeRouteEventLayer, any ideas on why variable for in event properties no work?</title>
      <link>https://community.esri.com/t5/python-questions/makerouteeventlayer-any-ideas-on-why-variable-for/m-p/715066#M55498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I using the below code snippet to create a route event and will eventually set it up to accept input parameters for the route ID, begin MP and End MP. So I was thinking I test setting it up to "build" the in event properties input using string formatting. But the string I have assigned to the props variable does not seem to work.&amp;nbsp; Any ideas out there of what I am missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
import os
arcpy.env.overwriteOutput = 1
arcpy.env.workspace = r"\\itdhq1apt50\GIS_Data\NeedsTracking\Scratch.gdb"
gdb_loc = arcpy.env.workspace
scratch = arcpy.env.scratchWorkspace
scratch_gdb = os.path.join(scratch, 'scratch.gdb')
print "starting this darn task"
arcpy.AddMessage("starting this darn task")

in_line = "Database Connections\CONNECTION SDE 4 MAPPING.sde\sdeProd.SDE.StateHighwayUpdateFile" #sde statehwy data used to create route file
rteID = "RD_NAME" # using this a route ID to create routes base on road number rather than segment no
#rteID = "UNIQUE_ID" # this will create routes based on segment no
outRoute = "StateHwyRouteFile"
outEvent = "lineTemp"
fc = "LineSelection"
#fc_prj = "PointsTestingWM"
fc_prj = os.path.join(scratch,'LineSelectionWM')
csWM = r"Coordinate Systems\Projected Coordinate Systems\World\WGS 1984 Web Mercator (Auxiliary Sphere).prj"
#table = arcpy.GetParameter(0)
table = gdb_loc + os.sep + "locateRoute"

inRoute = "routeID"
inBMP = "BMP"
inEMP = "EMP"
props = '"%s %s %s %s"' % (inRoute, 'LINE', inBMP, inEMP)
arcpy.MakeRouteEventLayer_lr(outRoute, rteID, table, props, outEvent, "#", "ERROR_FIELD")
#arcpy.MakeRouteEventLayer_lr(outRoute, rteID, table, "routeID LINE BMP EMP", outEvent, "#", "ERROR_FIELD")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 19:45:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/makerouteeventlayer-any-ideas-on-why-variable-for/m-p/715066#M55498</guid>
      <dc:creator>MichaelMiller2</dc:creator>
      <dc:date>2012-08-24T19:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: MakeRouteEventLayer, any ideas on why variable for in event properties no work?</title>
      <link>https://community.esri.com/t5/python-questions/makerouteeventlayer-any-ideas-on-why-variable-for/m-p/715067#M55499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In python the seperator between your properties is the | symbol, not a space. Your properties would be "routeID|Line|&lt;SPAN style="color: #000000;"&gt;inBMP|inEMP".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;If you called the same model from C# you would use spaces.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 23:19:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/makerouteeventlayer-any-ideas-on-why-variable-for/m-p/715067#M55499</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2017-03-07T23:19:22Z</dc:date>
    </item>
  </channel>
</rss>

