<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blair Services &#187; Relationships</title>
	<atom:link href="https://blairservices.net/tag/relationships/feed/" rel="self" type="application/rss+xml" />
	<link>https://blairservices.net</link>
	<description>GIS Solutions</description>
	<lastBuildDate>Wed, 31 Jan 2018 20:07:59 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>Updating Relationship Labels</title>
		<link>https://blairservices.net/updating-relationship-labels/</link>
		<comments>https://blairservices.net/updating-relationship-labels/#comments</comments>
		<pubDate>Wed, 13 Aug 2014 20:50:33 +0000</pubDate>
		<dc:creator><![CDATA[Jason Larner]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[Geodatabase]]></category>
		<category><![CDATA[Relationships]]></category>

		<guid isPermaLink="false">http://dev.blairservices.net/?p=108</guid>
		<description><![CDATA[<p>Say you&#8217;ve just built a Geodatabase. Maybe from a Visio UML schema, maybe some other way. On detailed inspection you&#8217;ve found that either the forward or backward path label on one of your relationships is wrong. (As might happen if you&#8217;ve copied/pasted relationship definitions in your Visio and not changed the path labels.) Now these [...]<br /><a class="btn btn-purple read-more" href="https://blairservices.net/updating-relationship-labels/"> Read more &#187;</a></p>
<p>The post <a rel="nofollow" href="https://blairservices.net/updating-relationship-labels/">Updating Relationship Labels</a> appeared first on <a rel="nofollow" href="https://blairservices.net">Blair Services</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Say you&#8217;ve just built a Geodatabase. Maybe from a Visio UML schema, maybe some other way. On detailed inspection you&#8217;ve found that either the forward or backward path label on one of your relationships is wrong. (As might happen if you&#8217;ve copied/pasted relationship definitions in your Visio and not changed the path labels.)</p>
<p>Now these labels are just as their name implies, &#8220;labels&#8221;. Kind of like an alias name on a feature class or a field. Difference is that you can&#8217;t change the label through the ArcCatalog user interface.</p>
<p>So&#8230; from here you could delete and re-create the relationship. Or go back to the beginning and re-create the Geodatabase (if this came from Visio you should certainly update the Visio model.) But, if it&#8217;s really inconvenient to do this, then ArcObjects offers a method to change the label. Add the VBA code below to your ArcCatalog, connect it to a button and give it a go.</p>
<p><a href="https://blairservices.net/wp-content/uploads/OldForwardPathLabel.png"><img class="alignnone wp-image-290 size-full" src="https://blairservices.net/wp-content/uploads/OldForwardPathLabel.png" alt="OldForwardPathLabel" width="316" height="150" /></a></p>
<pre><code>Private Sub AlterRelationshipLabels()
  Dim gxApp As IGxApplication
  Dim gxObject As IGxObject
  Set gxApp = Application
  Set gxObject = gxApp.SelectedObject
  ' make sure something is selected
  If (Not (gxObject Is Nothing)) Then
    ' make sure data is selected
    If (Not TypeOf gxObject Is IGxDataset) Then
      MsgBox "Selected object is not a relationship class", vbInformation
    Else
      Dim gxDataset As IGxDataset
      Set gxDataset = gxObject
      Dim dataset As IDataset
      Set dataset = gxDataset.dataset
      If gxDataset.Type &lt;&gt; esriDTRelationshipClass Then
        MsgBox "Selected object is not a relationship class", vbInformation
      Else
        Dim relClass As IRelationshipClass
        Set relClass = dataset
        Dim relClassEdit As IRelClassSchemaEdit
        Set relClassEdit = relClass
        Dim vbResponse As VbMsgBoxResult
        Dim sLabel As String
        vbResponse = MsgBox("Old forward path label: " &amp; relClass.ForwardPathLabel &amp; _
          " Change it? ", vbYesNo)
        If (vbResponse = vbYes) Then
          sLabel = InputBox("Enter new forward path label:", "Forward Path Label")
          relClassEdit.AlterForwardPathLabel sLabel
        End If
        vbResponse = MsgBox("Old backward path label: " &amp; relClass.BackwardPathLabel &amp; _
          " Change it? ", vbYesNo)
        If (vbResponse = vbYes) Then
          sLabel = InputBox("Enter new backward label:", "Backward Path Label")
          relClassEdit.AlterBackwardPathLabel sLabel
        End If
      End If
  End If
End If
End Sub</code></pre>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://blairservices.net/updating-relationship-labels/">Updating Relationship Labels</a> appeared first on <a rel="nofollow" href="https://blairservices.net">Blair Services</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://blairservices.net/updating-relationship-labels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
