| Article | 60000722 |
| Type | HowTo |
| Product | Engine |
| Date Added | 12/29/2008 12:00:00 AM |
| Fixed | (12/29/2008 12:00:00 AM) |
| Submitted by | Jesus Nicolas Zaragoza Grife |
Summary
How can I use the AlignToView and AlignToViewSize in the wrapper
Solution
This article applies to version 6014 and above. Using the VectorDraw.Professional.tlb, on a VB6 project just add a vdraw wrapper and 2 buttons and a code like :
Private Sub Command6_Click()
Dim txt As VDrawI5.vdText
Dim AlignObject As VectorDraw_Professional.IAlignToViewSet txt = VD.ActiveDocument.entities.AddText("aaBB", Array(10, 10), 1)
VD.CommandAction.CmdRect Array(9.5, 9.5), Array(14, 11.5)
VD.CommandAction.Zoom "E", 0, 0
Set AlignObject = txt.WrapperObject ' set this text to be always parallel to the view.
AlignObject.AlignToView = TrueAlignObject.AlignToViewSize = 20 'text size always the same, size in pixelsEnd SubPrivate Sub Command7_Click()
VD.CommandAction.View3D "VROT"
End Sub
