Dim pActiveView As IActiveView Dim pEnv As IEnvelope pActiveView = pMxDoc.PageLayout pEnv = New Envelope Dim pTextElement As ITextElement pTextElement = New TextElement pTextElement.Text = "blah, blah"" 'Set font Dim pTextSym As IFormattedTextSymbol pTextSym = New TextSymbol Dim pFont As stdole.IFontDisp pFont = New stdole.StdFont pFont.Name = "Times New Roman" pFont.Size = 23 pFont.Bold = True pTextSym.Font = pFont pTextElement.Symbol = pTextSym pEnv.PutCoords(4.5, 7, 4.5, 7) 'this was a bit tricky to specifically determine where to place Dim pElem As IElement pElem = pTextElement pElem.Geometry = pEnv Dim pGc As IGraphicsContainer pGc = pMxDoc.PageLayout pGc.AddElement(pElem, 0)
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.