[Connect update 4] Issue with TextStyle

Hi,

My system is windows 7, VS 2015

I find Text Style Height and Width behavior very strange and here is example.

I have created TextNode with multiline text. With each new line, font height and width is different.

Debug.Print Application.ActiveSettings.TextStyle.Width prints result zero when clearly width is 10

Then I change width and Height to 20 and result is strange as picture shows.

dgn file is attached.

VBA code:

     Debug.Print Application.ActiveSettings.TextStyle.Name
     Debug.Print Application.ActiveSettings.TextStyle.Height
     Debug.Print Application.ActiveSettings.TextStyle.Width

     Application.ActiveSettings.TextStyle.Height = 20
     Application.ActiveSettings.TextStyle.Width = 20

           Dim nTxt As TextNodeElement
            Set nTxt = Application.CreateTextNodeElement2(Nothing, Point3dFromXYZ(0, 0, 0), Matrix3dIdentity)

            nTxt.AddTextLine ("test1")
            nTxt.AddTextLine ("test1")
            nTxt.AddTextLine ("test1")
            nTxt.AddTextLine ("test1")
            ActiveModelReference.AddElement nTxt


          Dim oPH As PropertyHandler
          Set oPH = Application.CreatePropertyHandler(nTxt)
          oPH.SelectByAccessString ("ViewDependent")
          oPH.SetValue (False)





5344.test.dgn



Any idea?
best regards
Nenad
Parents Reply Children
No Data