<?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: VB.NET Add Relates using IMapTableInfo in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578877#M15630</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just had a look at the API. Looking at this &lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//001200000m68000000"&gt;page&lt;/A&gt;​ it seems to be related to &lt;STRONG&gt;Mapserver&lt;/STRONG&gt;​, are you trying to use this in an addin for say desktop? If so I don't think it will work. It was not clear if you are developing a desktop solution or some sort of server application?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 May 2016 17:58:27 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2016-05-25T17:58:27Z</dc:date>
    <item>
      <title>VB.NET Add Relates using IMapTableInfo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578875#M15628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've come across an issue with MXD relates and I need a .NET solution to add them to a map. I started with a sample that uses ArcObjects, but I hit a stumbling block with the IMapTableInfo Interface. I have no idea how to get or set this object. I've read the documentation page, but it doesn't seem to have any useful information (that I understood).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone used this object?&lt;/P&gt;&lt;P&gt;Does anyone have code samples using IMapTableInfo that can help me?&lt;/P&gt;&lt;P&gt;Does anyone have code samples that can help me add MXD relates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code sample I've already found (the problem being that it expects a valid IMapTableInfo object as a parameter):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;IRelateInfos pRIs = null; 
IRelateInfo pRI = null;
pRIs = pMTI.RelateInfos;
if (pRIs == null) 
{
&amp;nbsp; Console.WriteLine(“No relationship is available”); 
&amp;nbsp; return;
}
for (int j = 0; j &amp;lt; pRIs.Count; j++)
{
&amp;nbsp; pRI = pRIs.get_Element(j);
&amp;nbsp; Console.WriteLine(pRI.Name + “, " + pRI.RelationshipID + “, ” + pRI.RelatedTableID + “\n”);
}

&lt;/PRE&gt;&lt;P&gt;I've also explored Python and geoprocessing as options. There is no method to "Add Relates" in ArcMap. It does exist in ArcGIS Pro, but that product is basically nonfunctional.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:53:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578875#M15628</guid>
      <dc:creator>Corbinde_Bruin</dc:creator>
      <dc:date>2021-12-12T00:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Add Relates using IMapTableInfo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578876#M15629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The only thing I've tried since I posted was to cast a valid IStandaloneTable object as a &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;IMapTableInfo and that did not work.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 13:31:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578876#M15629</guid>
      <dc:creator>Corbinde_Bruin</dc:creator>
      <dc:date>2016-05-18T13:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Add Relates using IMapTableInfo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578877#M15630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just had a look at the API. Looking at this &lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//001200000m68000000"&gt;page&lt;/A&gt;​ it seems to be related to &lt;STRONG&gt;Mapserver&lt;/STRONG&gt;​, are you trying to use this in an addin for say desktop? If so I don't think it will work. It was not clear if you are developing a desktop solution or some sort of server application?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 17:58:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578877#M15630</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-05-25T17:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Add Relates using IMapTableInfo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578878#M15631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are trying to "relate a table to a layer in ArcMap", the VBA sample at &lt;A href="http://help.arcgis.com/EN/sdk/10.0/vba_desktop/conceptualhelp/index.html#//000100000037000000" title="http://help.arcgis.com/EN/sdk/10.0/vba_desktop/conceptualhelp/index.html#//000100000037000000"&gt;ArcObjects 10 VBA SDK Help&lt;/A&gt;&amp;nbsp; might be helpful. I have not tried it myself, but the method should also work for .NET.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 14:52:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578878#M15631</guid>
      <dc:creator>YuanLiu</dc:creator>
      <dc:date>2016-06-01T14:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Add Relates using IMapTableInfo</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578879#M15632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it working with Yuan Liu's suggestion. Thank you very much. I had not previously found that sample. Just be wary that some of the syntax is wrong in some in the VB.NET sample. You have to piece it together from the C# and VBA samples. Then read the documentation on IMemoryRelationshipClassFactory as well. That helped me to discover I had switched my field names for the Primary and Foreign keys when I was receiving a generic COM Error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To clarify, this was to develop a .NET addin for ArcMap 10.3 (Desktop).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2016 13:26:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-add-relates-using-imaptableinfo/m-p/578879#M15632</guid>
      <dc:creator>Corbinde_Bruin</dc:creator>
      <dc:date>2016-06-22T13:26:57Z</dc:date>
    </item>
  </channel>
</rss>

