POST
|
Thanks, this is useful, although it doesn't really address the question. It seems the actual answer is something along these lines... var mapViews = new List<MapView>();
foreach(var mp in ProApp.Panes.OfType<IMapPane>())
{
mapViews.Add(mp.MapView);
}
foreach(var lp in ProApp.Panes.OfType<ILayoutPane>())
{
foreach(var mp in lp.LayoutView.Layout.Elements.OfType<IMapPane>())
{
mapViews.Add(mp.MapView);
}
}
... View more
2 weeks ago
|
1
|
1
|
106
|
POST
|
Thanks. How do you get the MapViews that are related to a MapProjectItem?
... View more
2 weeks ago
|
0
|
0
|
141
|
POST
|
Let's say I want to know the extent of every MapView in my current project. I can retrieve the extent by doing something with the MapView.Extent object. What I can't see is how to get a list of MapViews? I can: Extract a list of every Map in the current project by using ArcGIS.Desktop.Core.Project.Current.GetItems<MapProjectItem>() and then calling GetMap() on each item Extract the parent Map for each MapView by calling MapView.Map Extract the active MapView extent by calling MapView.Active Do things with MapPanes, but only if the map is in a layout I might be missing something obvious, so does anyone have any clues?
... View more
2 weeks ago
|
0
|
5
|
194
|
POST
|
Thanks! ActiveWindowChangingEvent (not Pane) seemed a good solution, although I haven't managed to get what I really want working at the moment. The events just seem too unpredictable - ElementsUpdatedEvent seemed promising, but it's really difficult to tell what's actually changed and very easy to fall into infinite loops. I'm putting this on the back burner for now, but will accept your suggested solution above and will update if there are future developments.
... View more
01-26-2021
06:46 PM
|
0
|
0
|
100
|
POST
|
Thanks for responding, but that example just illustrates changing text in a non-dynamic element. It's not clear how the value renders in a dynamic text element. One theoretical approach would be to hook into an event called something like RenderDynamicTextElementEvent, but I can't see anything like that in the docs. Another might be to somehow tell the SDK to render the value in place of the dynamic text, but I can't see how to do that either.
... View more
01-26-2021
07:24 AM
|
0
|
2
|
111
|
POST
|
Is it possible to create custom dynamic text fields through the SDK? Let's say (as a bad example) that I want to display the user's computer name on every printed layout. I would write some custom C# to extract the computer name, and ideally expose it through something like: PC name: <dyn type="custom" property="computerName"> Which would then render as: PC name: Donald's MacBook Pro In case it wasn't clear, I'm just using this as a simple example - this isn't actually what I'm trying to do. I can't figure out from the documentation whether this is possible, and where the rendering actually happens? Anyone have any ideas?
... View more
01-22-2021
04:00 PM
|
0
|
5
|
159
|
Online Status |
Offline
|
Date Last Visited |
yesterday
|