dbroada Posted November 6, 2009 Posted November 6, 2009 I intend positioning text using the following code but it always ends up at 0,0. What am I doing wrong? Private Sub CommandButton2_Click() Dim myString As String Dim Pos(2) As Double Dim myText As AcadText Dim myPos As Variant Pos(0) = 43.62: Pos(1) = 43.03: Pos(2) = 0 myPos = Pos Set myText = ThisDrawing.ModelSpace.AddText(txtIssue.Text, myPos, 4) myText.color = acCyan myText.Alignment = acAlignmentMiddleCenter ThisDrawing.Regen acAllViewports End Sub Quote
fixo Posted November 6, 2009 Posted November 6, 2009 I intend positioning text using the following code but it always ends up at 0,0. What am I doing wrong? Private Sub CommandButton2_Click() Dim myString As String Dim Pos(2) As Double Dim myText As AcadText Dim myPos As Variant Pos(0) = 43.62: Pos(1) = 43.03: Pos(2) = 0 myPos = Pos Set myText = ThisDrawing.ModelSpace.AddText(txtIssue.Text, myPos, 4) myText.color = acCyan myText.Alignment = acAlignmentMiddleCenter ThisDrawing.Regen acAllViewports End Sub Add TextAlignmentPoint: myText.Alignment = acAlignmentMiddleCenter myText.TextAlignmentPoint = myPos ~'J'~ Quote
fixo Posted November 6, 2009 Posted November 6, 2009 excellent - thank you You're welcome Cheers ~'J'~ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.