1 Reply Latest reply on Jul 18, 2015 6:15 AM by Deepak Gupta

    Change Size of Text in Annotation Balloon

    Lucas Gingery

      If I have an annotation balloon selected, is there a bit of code I would use to change the size of the text within the balloon?

        • Re: Change Size of Text in Annotation Balloon
          Deepak Gupta

          Dim swApp                       As SldWorks.SldWorks

          Dim swModel                     As SldWorks.ModelDoc2

          Dim swSelMgr                    As SldWorks.SelectionMgr

          Dim swAnnObj                    As Object

          Dim swAnn                       As SldWorks.Annotation

          Dim swTextFormat                As SldWorks.TextFormat

          Sub main()

           

           

          Set swApp = Application.SldWorks

          Set swModel = swApp.ActiveDoc

          Set swSelMgr = swModel.SelectionManager

          Set swAnnObj = swSelMgr.GetSelectedObject6(1, -1)

          Set swAnn = swAnnObj.GetAnnotation

                    

          Set swTextFormat = swAnn.GetTextFormat(0)

          swTextFormat.CharHeight = 0.01

          swTextFormat.Bold = True

          swTextFormat.TypeFaceName = "Calibri"

          swAnn.SetTextFormat 0, False, swTextFormat

                  

          End Sub