Sub Rotation_Example()
' This example creates text and adds it to the drawing using the
' AddText method. It then obtains and resets the Rotation property.
Dim sText As String: sText = "Test string for Rotation property"
Dim insPt(0 To 2) As Double: insPt(0) = 0: insPt(1) = 9
Dim dHeight As Double: dHeight = 5
Dim textObj As AcadText
Set textObj = ThisDrawing.ModelSpace.AddText(sText, insPt, dHeight)
textObj.Update
ThisDrawing.Application.ZoomExtents
MsgBox "The ObliqueAngle is " & textObj.Rotation
'Change the Rotation to 45 degrees (0.785 radians)
textObj.Rotation = 0.785
textObj.Update
ThisDrawing.Application.ZoomExtents
MsgBox "The Rotation is set to " & textObj.Rotation
End Sub
Bricscad™ is commercialized by Bricsys NV. Bricsys NV and Vondle NV are fully owned subsidiaries of Menhirs NV. © 2001- Menhirs NV - All rights reserved. |