Compile error: Ambiguous name detected: AddressRelationships

Discussion created by JBiedenbender on Sep 22, 2010
Latest reply on Sep 23, 2010 by graff054

  I'm trying to run the following code and ever time I do so i get the "Compile error: Ambiguous name detected: AddressRelationships" error. Has anyone else had this issue?


Private Sub UIButtonControl1_Click()
Dim pMxDoc As IMxDocument
Dim pActiveView As IActiveView
Dim pExport As IExport
Dim pPixelBoundsEnv As IEnvelope
Dim exportRECT As tagRECT
Dim iOutputResolution As Integer
Dim iScreenResolution As Integer
Dim hDC As Long

Set pMxDoc = ThisDocument
Set pActiveView = pMxDoc.ActiveView
Set pExport = New ExportJPEG

pExport.ExportFileName = "L:\backup\jerry\ArcObjects." & Right(pExport.Filter, 3)
iScreenResolution = 96  'default screen resolution is usually 96dpi
iOutputResolution = 96
pExport.Resolution = iOutputResolution

With exportRECT
.Left = 0
.Top = 0
.Right = pActiveView.ExportFrame.Right * (iOutputResolution / iScreenResolution)
.bottom = pActiveView.ExportFrame.bottom * (iOutputResolution / iScreenResolution)
End With

Set pPixelBoundsEnv = New Envelope
pPixelBoundsEnv.PutCoords exportRECT.Left, exportRECT.Top, exportRECT.Right, exportRECT.bottom
pExport.PixelBounds = pPixelBoundsEnv

hDC = pExport.StartExporting
pActiveView.Output hDC, pExport.Resolution, exportRECT, Nothing, Nothing

End Sub