Drawing a Text Symbol on LayoutView

307
1
Jump to solution
05-21-2020 11:13 AM
Vamsi_KrishnaYarramaasu
New Contributor

I have following code in my ArcObjects application to draw TextSymbols in Page layout. Now I am looking to implement the same in Layouts in Pro.

IActiveView activeView = myPageLayout as IActiveView;
SimpleMarkerSymbol txtSymbol = Symbology.CreateTextSymbol(Colors.Black, strFontName, decFontSize, esriTextHorizontalAlignment.esriTHACenter, esriTextVerticalAlignment.esriTVATop)
ESRI.ArcGIS.Display.IScreenDisplay sDisplay = activeView.ScreenDisplay;
ScreenDisplay.StartDrawing(sDisplay.hDC, (System.Int16)ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache);
txtSymbol.GetTextSize(sDisplay.hDC, aoTransformation, strText, w, h);
ScreenDisplay.FinishDrawing();‍‍‍‍‍‍

How can this be done using C# ArcGIS Pro SDK ?

0 Kudos
1 Solution

Accepted Solutions
UmaHarano
Esri Regular Contributor

Hi

Here is the wiki page in the Pro SDK Documentation Repo that has a bunch of Layout SDK snippets.

ProSnippets: Layout

Thanks

Uma

View solution in original post

1 Reply
UmaHarano
Esri Regular Contributor

Hi

Here is the wiki page in the Pro SDK Documentation Repo that has a bunch of Layout SDK snippets.

ProSnippets: Layout

Thanks

Uma