Hi,
I'm writing a program to scale a drawing and when it encounters MTEXT it leaves the width factor at the previous value. I tried changing the width property but it does not change and it doesn't throw an error. Is there another property that handles this?
Thanks
For Each id In ids Dim ent As Entity = TryCast(tr.GetObject(id, OpenMode.ForRead, False), Entity) If ent Is Nothing Then Return If Not ent.IsWriteEnabled Then ent.UpgradeOpen() ent.TransformBy(Matrix3d.Scaling(convertVal, ptLL)) If TypeOf ent Is DatabaseServices.MText Then Dim mt As MText = ent mt.Width = mt.Width * convertVal End If Next
Solved! Go to Solution.
Solved by GeeHaa. Go to Solution.
It seems in order for the width to be changed the columnType has to be set to NoColumns. If this is set the MTEXT Object Scales without having to change the width. I'm not sure if this is OK to do but it seems to work.
For Each id In ids Dim ent As Entity = TryCast(tr.GetObject(id, OpenMode.ForRead, False), Entity) If ent Is Nothing Then Return If Not ent.IsWriteEnabled Then ent.UpgradeOpen() ent.TransformBy(Matrix3d.Scaling(convertVal, ptLL)) If TypeOf ent Is DatabaseServices.MText Then Dim mt As MText = ent If mt.ColumnType <> ColumnType.NoColumns Then If mt.ColumnCount = 1 Then mt.ColumnType = ColumnType.NoColumns End If End If End If Next