' View.Anno2Text ' Converts annotation theme to graphic text ' Notes: Arrows are not converted ' Multipoint Annotation is converted to SplineText ' View units must be defined '**** get theme theTitle = "Anno to Text" theView = av.GetActiveDoc theScale = theView.ReturnScale theUnits = theView.GetUnits.AsString.Substitute("_"," ").Extract(2) if (theScale = 0) then MsgBox.Info("View map units must be defined",theTitle) exit elseif (theUnits = "FEET") then ppu = 72 * 12 elseif (theUnits = "METERS") then ppu = 72 * 100 / 2.54 else theMsg = "Your map units are not supported."+NL+ "Please add a points per unit"+NL+ "conversion to this script." MsgBox.Info(theMsg, theTitle) exit end ThemeList = theView.GetActiveThemes if (ThemeList.Count <> 1) then MsgBox.Info("One Theme must be active",theTitle) exit end theTheme = ThemeList.Get(0) if (theTheme.Is(FTheme).Not) then MsgBox.Info("Active Theme is not an FTheme",theTitle) exit end theFTab = theTheme.GetFTab sf = theFTab.FindField("shape") val = theFTab.ReturnValue(sf,0) if (val.Is(Annotation).Not) then MsgBox.Info("Active Theme is not an Annotation Theme",theTitle) exit end '**** do it! if (theFTab.GetSelection.Count > 0) then colToProcess = theFTab.GetSelection nRecs = colToProcess.Count else colToProcess = theFTab nRecs = colToProcess.GetNumRecords end G_list = theView.GetGraphics G_list.UnselectAll nCount = 0 for each r in colToProcess theAnno = theFTab.ReturnValue(sf,r) thePLine = theAnno.GetBaseline theText = theAnno.GetText theHeight = theAnno.GetHeight if (thePLine.AsMultipoint.AsList.Count = 1) then thePoint = thePLine.AsMultiPoint.AsList.Get(0) theGraphicText = GraphicText.Make(theText,thePoint) else theGraphicText = SplineText.Make(theText,thePLine) end theGraphicText.SetVisible(TRUE) theGraphicText.SetSelected(TRUE) theSymbol = theGraphicText.GetSymbol theSymbol.SetSize(theHeight * ppu / theScale) theView.GetDisplay.Hookupsymbol(theSymbol) G_list.Add(theGraphicText) theGraphicText.Invalidate nCount = nCount + 1 av.SetStatus((nCount / nRecs) * 100) end av.SetStatus(100)