vb.neteyeshot

how i can measure width of text entity in Eyeshot Vb.net?


I want to measure text width in Vb.net. Just like i have a text entity, i can get or set the text height but unable to get the text width.Just like the text in the code, i want its width , i have set its height to be 0.25 in the constructor.

Dim a As Text
a.TextString = "Ahmad"
a.Height = 0.25
a.Plane = Plane.ZX
a.InsertionPoint = New Point3D(xMinGlobal - 2.5, 0, 1.5)

Solution

  • You can check the BoxSize property of the entity. If it's Nothing, try calling the Regen() method or adding the text entity to the scene.