| Message |
Hi,
In case anyone is interested, I managed to solve these two problems.
Re:ILabelEngineLayerProperties
I managed to get round the problem using the below code. I set up a IFontDisp object, assigned all the properties to that then pointed an ITextSymbol object's Font property to look at it. I then pointed the ILabelEngineLayerProperties object's symbol property to look at the Textsymbol. Don't know why it has to be this longwinded, but it works.
Dim pTextSymbol As ITextSymbol
Set pTextSymbol = New TextSymbol
Dim pFont As IFontDisp
Set pFont = New StdFont
pFont.Name = "Arial"
pFont.Bold = True
pFont.Size = 12
pTextSymbol.Font = pFont
Set pLabelProps.Symbol = pTextSymbol
Re: ILineLabelPosition
It seems to get this to work correctly you have to set all the properties to true or false regardless of whether you're wanting to use them or not. I only used three - see code below. Again this seems crazy to me, and I found no mention of it in the developer help, just happened to stumble across it in another posting by a guy called Steve Clark. Well done Steve.
Dim pLineLabelPos As ILineLabelPosition
Set pLineLabelPos = New LineLabelPosition
With pLineLabelPos
.Above = True
.AtEnd = False
.AtStart = True
.Below = False
.Horizontal = False
.InLine = False
.Left = False
.Offset = 0
.OnTop = False
.Parallel = True
.Perpendicular = False
.ProduceCurvedLabels = False
.Right = False
End With
Cheers,
Steve |