<?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: Locate a route event in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/871481#M5219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marvis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Currently the sole purpose of the&amp;nbsp;CIMRouteEventDataConnection class is to expose some properties on a 'Route Event Layer'.&amp;nbsp; However, if you take a look at the comments in this 'idea post' this might be of help to you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/ideas/13766" target="_blank"&gt;https://community.esri.com/ideas/13766&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jun 2021 08:50:55 GMT</pubDate>
    <dc:creator>Wolf</dc:creator>
    <dc:date>2021-06-22T08:50:55Z</dc:date>
    <item>
      <title>Locate a route event</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/871480#M5218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I am attempting to obtain the geometry of a route event using the event properties. With ArcObjects VB.Net, this is the code that was used.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Dim routeLocation As IRouteLocation2&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;RouteMeasureLineLocationClass&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
routeLocation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RouteID&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;rteID
&lt;SPAN class="comment token"&gt;//...Set other route properties here..//&lt;/SPAN&gt;
Dim routeMeasureLineLocation As IRouteMeasureLineLocation&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;DirectCast&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;routeLocation&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;IRouteLocation2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
routeMeasureLineLocation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FromMeasure&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;fromMeasure
routeMeasureLineLocation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ToMeasure&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;toMeasure
Dim geometry As IGeometry&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;Nothing
Dim routeLocator as IRouteLocator &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Me&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;RouteLocator&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
routeLocator&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Locate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;routeLocation&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;locatingError&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In converting the above code to Pro SDK C#, I was able to create an instance of the CIMRouteEventDataConnection class and set its properties as below:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; routeLocation &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;CIMRouteEventDataConnection&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
routeLocation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RouteIDFieldName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; RouteFieldname&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
routeLocation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RouteMeasureUnit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LinearUnit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Miles&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
routeLocation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FromMeasureFieldName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fromMsField&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
routeLocation&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ToMeasureFieldName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ToMsField&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;I, however, don't see a method for 'Locate' like in ArcObjects. So how do I actually generate the geometry that represents the line event?&lt;A href="https://community.esri.com/migrated-users/86730" target="_blank"&gt;Uma Harano&lt;/A&gt;&lt;A href="https://community.esri.com/migrated-users/10927" target="_blank"&gt;Wolfgang Kaiser&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:53:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/871480#M5218</guid>
      <dc:creator>MarvisKisakye1</dc:creator>
      <dc:date>2021-12-12T10:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Locate a route event</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/871481#M5219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marvis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Currently the sole purpose of the&amp;nbsp;CIMRouteEventDataConnection class is to expose some properties on a 'Route Event Layer'.&amp;nbsp; However, if you take a look at the comments in this 'idea post' this might be of help to you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/ideas/13766" target="_blank"&gt;https://community.esri.com/ideas/13766&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jun 2021 08:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/871481#M5219</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-06-22T08:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Locate a route event</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/1042488#M6405</link>
      <description>&lt;P&gt;Hello... I am also interested in learning about methods associated with CIMRouteEventDataConnection. We currently have an ArcMap AddIn written with original COM objects... then into VB.NET... now I am looking at building the same AddIn with ArcPro SDK .NET for use in ArcGIS PRO. Any new insights on how this may be done? maybe SDK .NET has not fully be built?&amp;nbsp; Our tool calculates a RiverMile distance from the mouth of a stream based on a Route being identified and then using associated feature Field Values of the layer being identified by the Route.&amp;nbsp; Thanks...&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 17:27:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/1042488#M6405</guid>
      <dc:creator>RussBurman</dc:creator>
      <dc:date>2021-03-31T17:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Locate a route event</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/1100066#M7152</link>
      <description>&lt;P&gt;Does anybody have an actual solution for this&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/459769"&gt;@RussBurman&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/331236"&gt;@MarvisKisakye1&lt;/a&gt;&amp;nbsp;?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 19:47:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/1100066#M7152</guid>
      <dc:creator>JamalWest2</dc:creator>
      <dc:date>2021-09-20T19:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Locate a route event</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/1100100#M7153</link>
      <description>&lt;P&gt;I saw that the topology api was released. I mean to look through it to see if it provides some solutions but I have not yet had the time. Check it out and see if it has what you need.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 21:22:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/1100100#M7153</guid>
      <dc:creator>MarvisKisakye1</dc:creator>
      <dc:date>2021-09-20T21:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Locate a route event</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/1100129#M7154</link>
      <description>&lt;P&gt;Well I actually figured this out today. I'm shocked honestly. I might be doing something slightly different than you guys, but I was simply trying to return the x,y of point along the route at a specific distance(measurement).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; QueryFilter qF = new QueryFilter
  {
    WhereClause = "RouteNumber = '504'"      
  };
nLayer.Select(qF);
var featci = nLayer.GetSelection();
using (ArcGIS.Core.Data.RowCursor rCursor = featci.Search())
  {
    while (rCursor.MoveNext())
    {
       Feature gsFeature = rCursor.Current as Feature;
       var feat = gsFeature.GetShape();
       var efeat = feat.ToEsriShape();
       Polyline polyline = PolylineBuilder.FromEsriShape(efeat);
       double m1, m2;
       ArcGIS.Core.Geometry.Multipoint multipoint = GeometryEngine.Instance.GetPointsAtM(polyline, .4, 0);
       var mpc = multipoint.PointCount.ToString();
       System.Windows.MessageBox.Show(mpc);              
       System.Windows.MessageBox.Show(multipoint.Points[0].X.ToString());                       
       System.Windows.MessageBox.Show(multipoint.Points[0].Y.ToString());
       }
            }                  
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 22:45:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/locate-a-route-event/m-p/1100129#M7154</guid>
      <dc:creator>JamalWest2</dc:creator>
      <dc:date>2021-09-20T22:45:05Z</dc:date>
    </item>
  </channel>
</rss>

