Tyke
24th Aug 2010, 09:50 am
Hi,
I am having a problem justifying text that I create in a VBA routine. When I use this code:
If ThisDrawing.ActiveSpace = acModelSpace Then
Set txtPNum = ThisDrawing.ModelSpace.AddText(strPNum, varPNumIns, dblTHeight)
Else
Set txtPNum = ThisDrawing.PaperSpace.AddText(strPNum, varPNumIns, dblTHeight)
End If
txtPNum.Alignment = acAlignmentRight
txtPNum.Update
The text is inserted at 0,0,0
If I comment out the alignment line the text is inserted in the expected position.
I also have some MText that I insert and I can't seem to find a method to set its alignment. In the AutoCAD Properties window there is an alignment property. :-(
Has anyone else encounted these problems and does anyone see what I'm doing wrong?
I am having a problem justifying text that I create in a VBA routine. When I use this code:
If ThisDrawing.ActiveSpace = acModelSpace Then
Set txtPNum = ThisDrawing.ModelSpace.AddText(strPNum, varPNumIns, dblTHeight)
Else
Set txtPNum = ThisDrawing.PaperSpace.AddText(strPNum, varPNumIns, dblTHeight)
End If
txtPNum.Alignment = acAlignmentRight
txtPNum.Update
The text is inserted at 0,0,0
If I comment out the alignment line the text is inserted in the expected position.
I also have some MText that I insert and I can't seem to find a method to set its alignment. In the AutoCAD Properties window there is an alignment property. :-(
Has anyone else encounted these problems and does anyone see what I'm doing wrong?