maplex as the default labelling engine?

1326
3
08-23-2010 11:38 AM
RobinWhite
New Contributor III
Is there a way to have Maplex activated by default when ArcMap is started up?  We use it for nearly all of our cartography and have the necessary licensing for interactively turning it on using the labelling toolbar; but I would like for it to be the default labelling engine, as we very often share ArcMap documents within our organization.
Tags (2)
0 Kudos
3 Replies
DanaNolan
Occasional Contributor III
There were some requests, either on the old forums or the ESRI Ideas site, for this. Not sure of the status. I agree that this causes problems; for instance, some Maplex labeling properties entered with points sometimes move the labels to strange locations in Standard because of unit translation problems. I have been creating layers for other people to use, and I have had to try to work around this problem. Note: I still use 9.2 because I am working for that impoverished big state in the West.

The labeling engine is a property of the data frame, not the layer, which means it doesn't save with the layer. If you have the wrong labeler set, then add layers, you have to remove them and readd them to undo any translation problems. So, you could figure out how to do a script thad adds a new data frame, sets its labeling engine, and copies any existing layers to the new data frame. But, I don't think we should have to do this kind of thing.
0 Kudos
ShaunConway
Occasional Contributor II
Although it is not ideal, this is how we currently set the Maplex labeling engine as default utilizing an event listner in vba.

If you are familiar with using vba in arc you can use the following code to have maplex be turned on whenever a map document is opened or a new map document is created. We set this up on certain user's PCs and save it in the Normal.mxt.

Copy and paste this code into the ThisDocument section:
Private Function MxDocument_NewDocument() As Boolean
    MaplexOn
End Function

Private Function MxDocument_OpenDocument() As Boolean
    MaplexOn
End Function


Then, you can copy and past this code into a new module:

Public Sub MaplexOn()

'This simple subroutine will change the label engine for all data frames in a map to be the maplex label engine
'You should have a maplex license enabled before running this code

Dim pMxDoc As IMxDocument
Dim pMaps As IMaps
Dim pMap As IMap
Dim index As Long
Dim pAnnotateMap As IAnnotateMap
Dim pApp As Application

Set pMxDoc = ThisDocument
Set pMaps = pMxDoc.Maps

'loop through all the maps
For index = 0 To pMaps.Count - 1
  Set pAnnotateMap = New esriMaplex.MaplexAnnotateMap  'cocreate a new MaplexAnnotateMap object
  Set pMap = pMaps.Item(index) 'get the map at the current index
  Set pMap.AnnotationEngine = pAnnotateMap 'set the map AnnotationEngine to be MaplexAnnotateMap
  'after setting the AnnotationEngine, the Map automatically translates all labeling properties to Maplex.
Next index

End Sub


The final step is to turn on your reference to the ESRI Maplex Object Library. In the VBA editor window, go to Tools and the References. Check the box next to "ESRI Maplex Object Library" and press OK.
0 Kudos
DavidPalomino
New Contributor

Here's a workaround that I found for saving the Maplex settings so that the settings carry over when opening/sharing an MXD on another computer:

1. Open a blank MXD.

2. Go to the Labeling Tool in your tool bar. On the Label drop-down, select "Use Maplex Label Engine".

3. Then, go to File - Open - navigate to where you saved the shared MXD and open your MXD.  

The Maplex settings should be carried over to your MXD.

Hope this helps.

0 Kudos