IGraphicsContainer graphicsContainer = myPageLayout.ActiveView.GraphicsContainer; graphicsContainer.Reset(); IElement pElement = graphicsContainer.Next(); while (pElement != null) { if (pElement is IMapFrame) { // do something } }
Thanks Shuping,Yes, in my code, I didn't include line: pElement = graphicsContainer.Next(); in the while loop.In your code, you selected shapes of the pagelayout, right ? Is it ok if you add and select shapes within the Focus Map (MapFrame) of the pagelayout ?Kind regards,
IGraphicsContainer graphicsContainer = axPageLayoutControl1.ActiveView.GraphicsContainer
IGraphicsContainer graphicsContainer = axPageLayoutControl1.GraphicsContainer;
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.