<?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: ValidateNetworkTopology in CoreHost in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/validatenetworktopology-in-corehost/m-p/1278965#M9682</link>
    <description>&lt;P&gt;There is something really odd with M and these shapes, see my earlier post.&amp;nbsp; Investigating the shapes when passed in have M values at like int.Max or something.&amp;nbsp; So I just take the same X, Y extents and SR and use that to build a new Envelope.&amp;nbsp; Then use that in the&amp;nbsp;ValidateNetworkTopology method and it works&lt;/P&gt;</description>
    <pubDate>Fri, 14 Apr 2023 21:59:09 GMT</pubDate>
    <dc:creator>JoeHershman</dc:creator>
    <dc:date>2023-04-14T21:59:09Z</dc:date>
    <item>
      <title>ValidateNetworkTopology in CoreHost</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/validatenetworktopology-in-corehost/m-p/1278904#M9680</link>
      <description>&lt;P&gt;We have an application that places a Tee and an attached service line (in gas) in a UN.&amp;nbsp; That part seems to work as expected.&amp;nbsp; The problem is trying to validate the topology afterwards. This seems like a pretty simple task simply call&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/2.7/sdk/api-reference/index.html#topic17662.html" target="_self"&gt;ValidateNetworkTopology Method&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to documentation this should not be wrapped in an edit operation.&amp;nbsp; Unfortunately this does not seem to work.&amp;nbsp; If I try this way, to first expand the envelope&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public ValidationResult ValidateTopology(UtilityNetwork utilityNetwork, Geometry serviceGeometry)
{
	//expand the area used for validation
	Envelope envelope = serviceGeometry.Extent.Expand(1.05, 1.05, true);

	ValidationResult result = utilityNetwork.ValidateNetworkTopology(envelope);
}&lt;/LI-CODE&gt;&lt;P&gt;The following exception is received&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;ArcGIS.Core.Data.GeodatabaseEnterpriseException: The specified coordinate exceeds the valid coordinate range. ---&amp;gt; System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80041590&lt;BR /&gt;at ArcGIS.Core.Internal.IUtilityNetworkIOP.UtilityNetwork_ValidateNetworkTopology(IntPtr utilityNetworkHandle, IntPtr extentHandle, Boolean useAsynchronousService, DateTime&amp;amp; timeStamp, Boolean&amp;amp; hasErrors, Int32&amp;amp; dirtyAreasCount, Boolean&amp;amp; isFullUpdate)&lt;BR /&gt;at ArcGIS.Core.Data.UtilityNetwork.UtilityNetwork.ValidateNetworkTopologyInternal(Geometry extent, InvocationTarget invocationTarget)&lt;BR /&gt;--- End of inner exception stack trace ---&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If instead of using the slightly expanded envelope, the service line geometry is sent the method simply times out.&amp;nbsp; No exception is received&lt;/P&gt;&lt;P&gt;Seems pretty straight forward, not sure what is incorrect&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 18:38:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/validatenetworktopology-in-corehost/m-p/1278904#M9680</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2023-04-14T18:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: ValidateNetworkTopology in CoreHost</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/validatenetworktopology-in-corehost/m-p/1278919#M9681</link>
      <description>&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;This should be a simple task, and I cannot see anything wrong with the code you have provided.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have access to fiddler? Could you compare the REST request packet between this call and a call to validate generated in Pro (using a similar feature)? &amp;nbsp;In particular, are the extent coordinates similar? &amp;nbsp;The only thing I can think of is that the coordinates you are passing in are using a different spatial reference than the utility network...&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 19:18:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/validatenetworktopology-in-corehost/m-p/1278919#M9681</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2023-04-14T19:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: ValidateNetworkTopology in CoreHost</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/validatenetworktopology-in-corehost/m-p/1278965#M9682</link>
      <description>&lt;P&gt;There is something really odd with M and these shapes, see my earlier post.&amp;nbsp; Investigating the shapes when passed in have M values at like int.Max or something.&amp;nbsp; So I just take the same X, Y extents and SR and use that to build a new Envelope.&amp;nbsp; Then use that in the&amp;nbsp;ValidateNetworkTopology method and it works&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 21:59:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/validatenetworktopology-in-corehost/m-p/1278965#M9682</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2023-04-14T21:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: ValidateNetworkTopology in CoreHost</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/validatenetworktopology-in-corehost/m-p/1279037#M9683</link>
      <description>&lt;P&gt;Glad to hear it, Joe. Good luck figuring out the M issues.&lt;/P&gt;&lt;P&gt;Take care,&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2023 17:26:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/validatenetworktopology-in-corehost/m-p/1279037#M9683</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2023-04-15T17:26:33Z</dc:date>
    </item>
  </channel>
</rss>

