//create the new map with settings IMap addMap = new Map(); addMap = m_maps.Create(); addMap.Name = scenarioName; IEnvelope mapExtent = new EnvelopeClass(); mapExtent = (IEnvelope)m_doc.ActiveView.Extent; //create new mapframe and set map layout IMapFrame addMapFrame = new MapFrameClass(); addMapFrame.Map = addMap; IElement mapFrameElement = (IElement)addMapFrame; IGraphicsContainer pGC = (IGraphicsContainer)m_doc.PageLayout; pGC.AddElement(mapFrameElement, 0);
Solved! Go to Solution.