Dynamic text with named data frame

228
2
10-27-2011 09:12 PM
MeToo
by
New Contributor
Hello everyone:

My experience with the 'data frame name' dynamic text in ArcMap 10.0 SP2 doesn't match the description found at http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Working_with_dynamic_text/00s900000013... as displayed below

[INDENT]Data Frame Name (Name: <dyn type="dataFrame" name="Main Map" property="name"/>)
This is the name of the identified data frame as specified on the Data Frame Properties dialog box. The data frame is identified by the name attribute name="Main Map". This value, as well as the tag, is updated every time the data frame's name is changed.[/INDENT]

The name of the dataframe in the Name tag is not updated and it appears that the data frame name displayed in the dynamic text is that of the active data frame when a new one is activated.

Suggestions/comments?
Thanks.
Tags (2)
0 Kudos
2 Replies
MeToo
by
New Contributor
Thanks David:

I understand how dynamic text works, but I now think that there is a bug or at least an unexpected, undocumented behavior.

If one ads the following correct DynText to a document that has the "Main Map" dataframe as well as others, and then removes the "Main Map" dataframe, the DynText shows the name of the active dataframe while NOT updating the value of its Name tag.

I would have expected that the layout would behave like it does with other DynTags, for ex. by displaying [Empty], or that it would update the value of the Name tag to the name of the active dataframe. I couldn't see that behavior documented anywhere and it threw me off while programming a complex application.

Name: <dyn type="dataFrame" name="Main Map" property="name"/>)

Dennis

PS: Writing such DynText with an invalid dataframe name is a good trick if one wants to display the name of the active dataframe as the DynText is still "alive"!... but that's not what I was trying to do!
0 Kudos
MeToo
by
New Contributor
No, based on the current documentation, the value of the Name tag is supposed to be the name of a dataframe; not the active dataframe. It is true that when inserted from the ArcMap menu, it automatically takes the name of the active dataframe (which is logical). And in retrospect, it may be a good thing that it shows the name of the active dataframe although a warning should also be given.

Where there is a problem is when ArcMap doesn't update the value of the name TAG when the dataframe of that name has been removed. Ideally, it should warn the user that the tag no longer corresponds to an existing dataframe and inform that the value of tag will be set to a reserved keyword to reflect that it will now on display the name of the active dataframe, for ex. ArcMap_ActiveDataFrame (or whatever keyword that is unlikely going to be used to name a real-live dataframe).  Currently the TAG is left to the name of the removed dataframe.

At the very least the behavior that it takes when the value of the Name tag is no longer correct should be documented.

The application I am programming starts with the value of the name tag and then tries to find the dataframe of that name. The way things stand now, that dataframe may not exist! That should be documented; it would have saved me a couple of days trying to figure out what was wrong in my complex program... while it was matching Esri's documentation and was logical.
0 Kudos