Stacked text possible for page specific "extra item?"

4 views
Skip to first unread message

jbe...@edmlink.com

unread,
Jun 9, 2009, 11:38:35 AM6/9/09
to arcmapbook
Greetings,

Does anybody know if it's possible to use VBScript to format the page
specific "extra item," the one that is labeled using a field from the
index layer? I'm interested in stacking text from this extra item
field using commas in the field as a delimiter and the following
VBScript:

Function FindLabel ( [Species] )
Dim s
Dim value
Dim label

s = SPLIT( [Species] , ",")

For Each value in s
label = label & vbNewLine & value
Next

FindLabel = "NWR Species: " & label
End Function

This works to stack text when used as a label expression in the layer
properties-labels GUI, but there's no obvious way to implement it when
using arcmapbook.

Thanks in advance!

Jon

Matt Wilkie

unread,
Jun 9, 2009, 1:44:39 PM6/9/09
to arcma...@googlegroups.com
Hi Jon,

I presume that you don't want to use the method that works, using
advanced label expression on the index features themselves, because
then the position of the labels would float about on the page as the
shape of the selected index feature changes?

One method to accomplish this might be to create a index layer from
the extent of your pages and populate it with the SPECIES attribute
from your current index layer. Then use maplex label engine to fix the
label position relative to the page frame (which is now a feature
class), and use the label expression you've already created.

- Create the page index feature class (FC) using the mapbook Grid
Generator Wizard with the "don't create empty grids" option. You'll
likely have to edit the resultant series of rectangles to position
properly over your species polygons and delete spurious ones.

- Then Spatial Join your page index FC with your species FC -- this
makes the SPECIES attribute values available to the page index.

- And now use the page index FC as your mapbook index and apply the
label expression to produce the stacked labels.


cheers,

-matt

jbe...@edmlink.com

unread,
Jun 10, 2009, 2:30:05 PM6/10/09
to arcmapbook
Thanks for your reply, Matt. You are correct that I want to display
the species data in a fixed area of the map layout, outside the main
data frame itself. I'm not clear about whether or not I need the
Maplex labeling extension to pursue the method you describe, but if
so, I don't have it. Can I do this without having Maplex?

Matt Wilkie

unread,
Jun 10, 2009, 3:08:23 PM6/10/09
to arcma...@googlegroups.com
I don't believe Maplex is necessary, it just allows more control over
the position of the label. You likely do have maplex though, just not
installed. Prior to 9.2 it was dollar-extra extension but now it is
free. Run setup from the install dvd and select "change/repair".

cheers,

-matt

Jon Belak

unread,
Jun 12, 2009, 1:59:41 PM6/12/09
to arcmapbook
I tried installing Maplex, but after the installation was unsuccessful
I eventually figured out through the knowledge base that it's only
free in 9.3 to users with and ArcInfo license (not ArcEditor or
Arcview; I have the latter). For users of the lower level licenses it
still costs $1500, I believe. I take it that Maplex is necessary for
the workaround you suggested in your previous message, correct?

Thanks again for your advice!
> > so, I don't have it.  Can I do this without having Maplex?- Hide quoted text -
>
> - Show quoted text -

Matt Wilkie

unread,
Jun 12, 2009, 5:40:50 PM6/12/09
to arcma...@googlegroups.com
Oh, I didn't realize maplex was not free for Arcview level license.
Sorry about that.

The workaround I suggested should still be possible, though it may
take some experimentation with label symbol offsets to get the text to
show up at the top left corner instead of the center of the polygon
(for example).

-matt

Jon Belak

unread,
Jun 15, 2009, 7:17:46 PM6/15/09
to arcmapbook
I'm sorry, I don't think I was clear enough about what I needed in
previous messages.

I would like to have the label show up completely outside of the data
frame as a stacked list that appears beside/below the map number and
name. I thought that the only way to get labels to appear outside the
map frame (without having Maplex) was to tag them as the MapBook index
layer field (or some other MapBook field). Unfortunately, when this
is done, the typical VBScript formatting options don't seem to be
available (one can only change font type, style, etc.). Since these
labeling options don't seem to be available for tagged items, I was
wondering if this functionality could be added by customizing the
MapBook code.

My index layer is based on USGS 7.5 minute quads, and these are
displayed a bit zoomed out in the data frame so that just the edges of
adjacent quads are visible. Given this, I think the spatial join
operation you mentioned might be redundant as I already have the
species listed as an attribute of each quad. However, it's also
possible that your suggestion is going completely over my head, so
please advise if I'm incorrect.

I appreciate your patience, Matt. Please let me know if you would
like to see the map layout I'm working with to make things more clear.

Jon

Matt Wilkie

unread,
Jun 15, 2009, 7:51:11 PM6/15/09
to arcma...@googlegroups.com
Hi Jon,

If the picture in my head matches yours I think the only way to
acheive it with the current mapbook is to add an attribute that has
the stacked labels as it's value (e.g. the vbscript formatting tags
are not necessary).

I'm off on leave for 3 weeks. Feel free to ping me after July 8th to
see if I have any further ideas then. We've just begun rebuilding a
major map series with multiple tagged fields, coincidentally ours is
also about multple species habitats, and I'll have some concrete
examples of our approach to share.

cheers,

-matt
--
-matt

Jon Belak

unread,
Jul 10, 2009, 1:21:27 PM7/10/09
to arcmapbook
Hi Matt,

I replied to this message yesterday, but Google kept telling me that
it could not post it. After a lot of clicking, it said that it did
post, but I don't see it up here today.

At any rate, I'm just checking in to see if there was any progress on
the formatting issue we discussed above. Please let me know when you
get a chance.

Thanks,

Jon
> -matt- Hide quoted text -

Matt Wilkie

unread,
Jul 14, 2009, 4:47:29 PM7/14/09
to arcma...@googlegroups.com
On Tue, Jun 9, 2009 at 8:38 AM, <jbe...@edmlink.com> wrote:
>
> Greetings,
>
> Does anybody know if it's possible to use VBScript to format the page
> specific "extra item," the one that is labeled using a field from the
> index layer?  I'm interested in stacking text from this extra item
> field using commas in the field as a delimiter and the following
> VBScript:

This is how I solved it here:

* create a new attribute, Map_Label
* use Field Calculator to derive it's value with the following expression:

replace( [SPECIES] , ",", vbnewline)

* then label the layer with the expression:

"NWR Species: " & [Map_Label]


cheers,

--
-matt

Jon Belak

unread,
Jul 21, 2009, 3:47:22 PM7/21/09
to arcmapbook
Thanks Matt--I'll give it a try soon.
Reply all
Reply to author
Forward
0 new messages