Article | 60000498 |
Type | Bug |
Product | Engine |
Version | 6011 |
Date Added | 5/2/2008 |
Fixed | Yes [5/2/2008] |
Submitted by | christof duvenbeck |
Keywords |
fixed in 6012
Example in VB6:
''VectorDraw.Geometry.TLB need to be referenced.
Private Sub Command1_Click()
VDraw1.ActiveDocument.New
Dim c As VDrawI5.vdCircle
VDraw1.CommandAction.CmdCircle Array(0, 0, 0), 5
Set c = VDraw1.ActiveDocument.entities.Last
c.Radius = 1 ' radius < 2 are not permited
c.Radius = 3 ' this is a valid value
c.CenterPoint = Array(1, 1, 0)
End Sub
Private Sub Form_Load()
VDraw1.FreezeEntityEvents 0
End Sub
Private Sub VDraw1_BeforeModify(ByVal Figure As VDrawI5.vdPrimary, ByVal ModificationType As String, newValue As Variant, exValue As Variant, Cancel As Integer)
Debug.Print "BeforeModify: " & Figure.Type & " - " & ModificationType & " - " & newValue
If Figure.Type <> "VDCIRCLE" Then Exit Sub
If ModificationType = "Center" And TypeOf newValue Is VectorDraw_Geometry.gPoint Then
Dim val As VectorDraw_Geometry.gPoint
Set val = newValue
ElseIf ModificationType = "Radius" And VarType(newValue) = vbDouble Then
Dim rad As Double
rad = newValue
If rad < 2 Then Cancel = 1
End If
End Sub