Impossible d'effectuer un cast d'un objet COM de type 'ESRI.ArcGIS.ArcMapUI.MxDocumentClass' en type d'interface 'ESRI.ArcGIS.Framework.IDocument'. Cette opération a échoué, car l'appel QueryInterface sur le composant COM pour l'interface avec l'IID '{3E927177-307A-11D2-94C9-080009EEBECB}' a échoué en raison de l'erreur suivante : Le serveur RPC n'est pas disponible. (Exception de HRESULT : 0x800706BA).
Dim objMxDoc As MxDocument ... objMxDoc = New MxDocument
Solved! Go to Solution.
Have you tried either
Dim objMxDoc As IMxDocument
objMxDoc = New MxDocument
or
Dim objMxDoc As New MxDocument
Private myApps As ESRI.ArcGIS.Framework.IApplication
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop)
... Dim objMxDoc As IMxDocument ... objMxDoc = New MxDocument
Have you tried either
Dim objMxDoc As IMxDocument
objMxDoc = New MxDocument
or
Dim objMxDoc As New MxDocument
Private myApps As ESRI.ArcGIS.Framework.IApplication
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop)
... Dim objMxDoc As IMxDocument ... objMxDoc = New MxDocument