Hi DuncanThank you for your precious input. I could solve the problem changing my code as follows (ArcMap.Document.ActiveView and MapClass instead of IActiveView.FocusMap and double-check if the view is the MapView):...// ActiveView
ESRI.ArcGIS.Carto.IActiveView pAView = ArcMap.Document.ActiveView; // Transformation nur in der MapView möglich (nicht in der LayoutView) ESRI.ArcGIS.Carto.IMap pMxMap = new MapClass();
if (pAView is IMap)
{
// Map
pMxMap = (ESRI.ArcGIS.Carto.IMap)pAView;
// Graphics Container
ESRI.ArcGIS.Carto.IGraphicsContainer pGC =
(ESRI.ArcGIS.Carto.IGraphicsContainer)pMxMap;
pGC.Reset();// Polyline Grafikelemente in die Shape-Datei schreiben ESRI.ArcGIS.Carto.IElement pElement = (ESRI.ArcGIS.Carto.IElement)pGC.Next(); while (!(pElement == null)) { if (pElement.Geometry.GeometryType == ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolyline) { pFBuff.Shape = pElement.Geometry; pFCur.InsertRow(pFBuff); } pElement = pGC.Next(); }...}Martin