InsertionPoint property example
Sub InsertionPoint_Example()
Dim sBuf As String
Dim textObj As AcadText
Dim insPt(0 To 2) As Double
insPt(0) = 0: insPt(1) = 9
Dim dHeight As Double
dHeight = 1
sBuf = "Test string for the AddText method"
Set textObj = ThisDrawing.ModelSpace.AddText(sBuf, insPt, dHeight)
textObj.Update
ThisDrawing.Application.ZoomExtents
Dim vInsertionPoint As Variant
vInsertionPoint = textObj.InsertionPoint
MsgBox "Insertion Point: " & _
Chr(13) & "x = " & vInsertionPoint(0) & _
Chr(13) & "y = " & vInsertionPoint(1) & _
Chr(13) & "z = " & vInsertionPoint(2)
Dim vTextAlignmentPoint As Variant
vTextAlignmentPoint = textObj.InsertionPoint
MsgBox "Text Alignment Point: " & _
Chr(13) & "x = " & vTextAlignmentPoint(0) & _
Chr(13) & "y = " & vTextAlignmentPoint(1) & _
Chr(13) & "z = " & vTextAlignmentPoint(2)
End Sub
© Bricsys NV. All rights reserved. |