Maplex label properties

1853
2
01-12-2011 03:42 AM
HenkZwols
Occasional Contributor
Hello all,

I'm building a tool that gathers all Maplex labelproperties for all labelclasses of all layers in an mxd. The result is stored in a csv-file, to get a sort of overview.
In the code below i'm using IMaplexOverposterLayerProperties to access these labelproperties.
The problem is that i can't access all the properties that are visible in de Maplex placement dialogs.
One of them is the checkbox Measure offset from feature geometry that is in the dialog Layer Properties->Placement Properties->Label Position->Label Offset of a point featureclass.

Can somebody tell me the way to access this setting?

Greetings, Henk

Private Function processAnnotation(pFeatureLayer As IFeatureLayer)
    
    Dim pAnnoPropsCol As IAnnotateLayerPropertiesCollection
    Dim pAnnoProps As IAnnotateLayerProperties
    Dim pOverProps As IOverposterLayerProperties
    Dim pLabelEngineLayerProperties2 As ILabelEngineLayerProperties2
    Dim pMaplexOverposterLayerProperties As IMaplexOverposterLayerProperties
    
    Dim pGeoLayer As IGeoFeatureLayer
    Set pGeoLayer = pFeatureLayer
    
    If pGeoLayer.DisplayAnnotation Then

        Set pAnnoPropsCol = pGeoLayer.AnnotationProperties
         
        Dim i As Long
        For i = 0 To pAnnoPropsCol.count - 1
            
            pAnnoPropsCol.QueryItem i, pAnnoProps
            Set pLabelEngineLayerProperties2 = pAnnoProps
            
            Set pMaplexOverposterLayerProperties = pLabelEngineLayerProperties2.OverposterLayerProperties
            
        
            Print #lFileId, "Placement Method: " & pMaplexOverposterLayerProperties.PointPlacementMethod
            Print #lFileId, "Can Shift Point Label " & pMaplexOverposterLayerProperties.CanShiftPointLabel
            '....
            '....
            '....
            
        Next i
    End If
End Function
0 Kudos
2 Replies
JeffreyHamblin
New Contributor III
In the API reference, I see that there is also an IMaplexOverposterLayerProperties2 and an IMaplexOverposterLayerProperties3.

In IMaplexOverposterLayerProperties2 there is a property: IsOffsetFromFeatureGeometry.

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/IsOffsetFromFeatureGeome...

-Jeff
0 Kudos
HenkZwols
Occasional Contributor
Thanks Jeff, that's what i was looking for. Don't know why i misst that 😞

Henk
0 Kudos